Article View: microsoft.public.vb.winapi
Article #1GetScrollInfo
From: 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
Technical Details
Message-ID:
<3636ED3B.CD348B8E@w-4.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 104093,205687d5585a5291,start X-Google-Attributes: gid104093,public X-Google-Thread: 10b213,205687d5585a5291,start X-Google-Attributes: gid10b213,public X-Google-Thread: 10229f,205687d5585a5291,start X-Google-Attributes: gid10229f,public From: Raphael Boos <smorp@w-4.de> Subject: GetScrollInfo Date: 1998/10/28 Message-ID: <3636ED3B.CD348B8E@w-4.de> X-Deja-AN: 405881559 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: microsoft.public.vb.winapi,microsoft.public.vb.controls,basicworld.public.vb.allgemein