Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mouse scrolling in window - PowerBuilder 7

1,113 views
Skip to first unread message

renne...@gmail.com

unread,
Jan 11, 2007, 4:37:10 PM1/11/07
to
Hi all,

I have a window and I would like to move through it using my mouse
scroll. But I didn't find any config that allow me doing that.

I am using PowerBuilder 7. Is it possible to do?

Thanks a lot.

Renne Rocha
renne...@progonos.com
www.progonos.com

Brad Wery [TeamSybase]

unread,
Jan 11, 2007, 9:36:26 PM1/11/07
to
After doing a little digging I found that this wasn't all that easy. I found
some C code and did a conversion. It works here but I'm not sure if it's the
best solution.

On your window:

//Declare Instance Variables
CONSTANT Long WM_MOUSEWHEEL = 522
CONSTANT Long SPI_GETWHEELSCROLLLINES = 104
CONSTANT Long WM_VSCROLL = 277
CONSTANT Long SB_LINEDOWN = 1
CONSTANT Long SB_LINEUP = 0

//Declare Local External Function
PUBLIC FUNCTION Long SystemParametersInfoA(Long uAction, Long uParam, REF
Long lpvParam, Long fuWinIni) LIBRARY "user32.dll"

//Windows Clicked Event
THIS.SetFocus()

//Windows Other Event
Long ll_WheelMouseLine
Long ll_lines
Long ll_index

CHOOSE CASE Message.Number
CASE WM_MOUSEWHEEL
SystemParametersInfoW(SPI_GETWHEELSCROLLLINES, 0, ll_WheelMouseLine, 0)

ll_Lines = IntHigh(wParam) / 120

IF ll_Lines > 0 THEN
FOR ll_index = 1 TO ll_WheelMouseLine
Send(Handle(THIS), WM_VSCROLL, SB_LINEUP,0)
NEXT
ELSE
FOR ll_index = 1 TO ll_WheelMouseLine
Send(Handle(THIS), WM_VSCROLL, SB_LINEDOWN,0)
NEXT
END IF
END CHOOSE


I think you'll need to find another way to get the High Word from a Long.
I'm not sure if IntHigh is available in PB7.

Good Luck, here's to hoping that someone else has a more effecient solution.

Brad

<renne...@gmail.com> wrote in message
news:1168551430.2...@i39g2000hsf.googlegroups.com...

Philip Salgannik

unread,
Jan 11, 2007, 11:24:11 PM1/11/07
to
Maybe this? :
http://www.pfcguide.com/extensions/ext_0022.asp

"Brad Wery [TeamSybase]" <bradweryatagricoreunited.com> wrote in message
news:45a7023a@forums-1-dub...

renne...@gmail.com

unread,
Jan 12, 2007, 11:13:14 AM1/12/07
to
Hi Brad,

PB7 has IntHigh().

It didn't work. Maybe I have forgotten to do something. I create an
event and it showed me a compilation error because of the lack of the
wParam variable.

The problem is in this line:


> ll_Lines = IntHigh(wParam) / 120

What is the value of wParam?

Thanks for your help

Renne Rocha
renne...@progonos.com
www.progonos.com

Brad Wery[TeamSybase]

unread,
Jan 12, 2007, 12:22:18 PM1/12/07
to
Don't create an event, use the event called Other (on your window). If
there is no event named "Other", map a new one to pbm_other.

Brad


--

Join the Advanced GUI Development project on CodeXchange
https://advanced-gui-development.codexchange.sybase.com/

renne...@gmail.com

unread,
Jan 17, 2007, 12:12:19 PM1/17/07
to
Hi Brad,

It perfectly worked. Thanks a lot!!! :-)

Renne Rocha
renne...@progonos.com
www.progonos.com

purva....@gmail.com

unread,
Jul 12, 2012, 2:52:21 AM7/12/12
to
Thanks Brad. It worked perfectly. I was searching for this from last 3 years. one more thing to tell the people for whom this didn't work.

If u have datawindows on the window then it may not work. so for that divert your datawindow other event to window other event with following code:


CONSTANT integer LCI_MOUSEWHEEL = 522

IF message.number = LCI_MOUSEWHEEL THEN
Parent.trigger event Other(wparam,lparam)
message.processed = TRUE
END IF

Bruce Armstrong [TeamSybase]

unread,
Jul 18, 2012, 7:58:19 PM7/18/12
to
Although this group is active on the Sybase server the feed between Google and the Sybase server is not currently working. If you post through Goolge the post will never show up on the Sybase server, and most people who answer questions in that group will never see it. Instead, you may want to access the Sybase newsgroups directly at:

http://www.sybase.com/detail_list?id=11507&pageNum=1&multi=true&show=1248

On Wednesday, July 11, 2012 11:52:21 PM UTC-7, purva....@gmail.com wrote:
> Thanks Brad. It worked perfectly. I was searching for this from last 3 years. one more thing to tell the people for whom this didn&#39;t work.

topw...@gmail.com

unread,
Sep 6, 2018, 10:45:31 AM9/6/18
to
The above link is dead, unfortunately...
0 new messages