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
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...
"Brad Wery [TeamSybase]" <bradweryatagricoreunited.com> wrote in message
news:45a7023a@forums-1-dub...
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
--
Join the Advanced GUI Development project on CodeXchange
https://advanced-gui-development.codexchange.sybase.com/
It perfectly worked. Thanks a lot!!! :-)
Renne Rocha
renne...@progonos.com
www.progonos.com