Thread View: microsoft.public.vb.winapi
2 messages
2 total messages
Started by Raphael Boos
Wed, 28 Oct 1998 00:00
GetScrollInfo
Author: Raphael Boos
Date: Wed, 28 Oct 1998 00:00
Date: Wed, 28 Oct 1998 00:00
48 lines
1950 bytes
1950 bytes
In VB5 I don't receive any results when using the GetScrollInfo for a
treeview in a control array. A call like
Dim scInfo As SCROLLINFO
scInfo.fMask=SIF_ALL 'or any other valid SIF constant
GetScrollInfo(trv(1).hwnd,SB_HORZ,scInfo)
always returns zero/False no matter if the Treeview has Scrollbars or
not. I also tried declaring the lpScrollInfo ByRef but it did not work.
Any ideas?
I used the following declarations:
Declare Function GetScrollInfo Lib "user32" (ByVal hwnd As Long, _
ByVal n As Long, _
lpScrollInfo As SCROLLINFO)
As Long
Public Type SCROLLINFO
cbSize As Long
fMask As Long
nMin As Long
nMax As Long
nPage As Long
nPos As Long
nTrackPos As Long
End Type
Public Const SB_BOTH = 3
Public Const SB_HORZ = 0
Public Const SB_VERT = 1
Public Const SIF_RANGE = &H1 '0x0001
Public Const SIF_PAGE = &H2 '0x0002
Public Const SIF_POS = &H4 '0x0004
Public Const SIF_DISABLENOSCROLL = &H8 '0x0008
Public Const SIF_TRACKPOS = &H10 '0x0010
Public Const SIF_ALL = SIF_RANGE Or SIF_PAGE Or SIF_POS Or SIF_TRACKPOS
Thanks in advance
Raphael Boos
smorp@t-online.de
Re: GetScrollInfo
Author: Chris Eastwood
Date: Wed, 28 Oct 1998 00:00
Date: Wed, 28 Oct 1998 00:00
22 lines
1287 bytes
1287 bytes
Hi Raphael Boos wrote in message <3636ED3B.CD348B8E@w-4.de>... >In VB5 I don't receive any results when using the GetScrollInfo for a >treeview in a control array. A call like > > Dim scInfo As SCROLLINFO > scInfo.fMask=SIF_ALL 'or any other valid SIF constant > GetScrollInfo(trv(1).hwnd,SB_HORZ,scInfo) > <Snip> The GetScrollInfo API Call will only get scroll information from a ScrollBar window - you'll need to get the handle of the Horizontal Scrollbar contained within the TreeView for this to work. Regards Chris Eastwood Software Engineer ACNielsen Ltd
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads