Re: Detect mouse pointer over scrollbar
- From: mr_unreliable <kindlyReplyToNewsgroup@xxxxxxxxxxx>
- Date: Wed, 17 Jan 2007 12:55:15 -0500
Greg, you may not need to get the window handles for the
scrollbar's component parts (even if they exist).
You may be able to manipulate the scrolling by sending
messages to the scroll bar.
cheers, jw
' Scroll Bar Constants
Private Const SB_HORZ = 0
Private Const SB_VERT = 1
Private Const SB_CTL = 2
Private Const SB_BOTH = 3
' Scroll Bar Commands
Private Const SB_LINEUP = 0
Private Const SB_LINELEFT = 0
Private Const SB_LINEDOWN = 1
Private Const SB_LINERIGHT = 1
Private Const SB_PAGEUP = 2
Private Const SB_PAGELEFT = 2
Private Const SB_PAGEDOWN = 3
Private Const SB_PAGERIGHT = 3
Private Const SB_THUMBPOSITION = 4
Private Const SB_THUMBTRACK = 5
Private Const SB_TOP = 6
Private Const SB_LEFT = 6
Private Const SB_BOTTOM = 7
Private Const SB_RIGHT = 7
Private Const SB_ENDSCROLL = 8
Greg Wilson wrote:
I am able to detect the left mouse button click with PeekMessage and thought I could check which window the mouse pointer is over when this occurs and programmatically induce the scrolling. My understanding is that the scrollbars are child windows to Excel's main window "XLMAIN" and the scrollbar arrows are either sibling or child windows to the scrollbar. Thus their handles could be obtained. I thought, say, GetWindowFromPoint or ChildWindowFromPoint would do it. Apparently not. I thought I had read this somewhere..
I have spent many hours to no avail. Much appreciative if someone could assist.
Kind regards,
Greg
- Prev by Date: Re: Active user (session)
- Next by Date: Re: Detect mouse pointer over scrollbar
- Previous by thread: Registry Monitoring
- Next by thread: Re: Detect mouse pointer over scrollbar
- Index(es):