
Determining Mouse pos over scrollbar?
Hi.
Yes, I think you have to use the getcursorpos API call to get the POINT_API
structure. When this structure gets populated, you can find the window
handle of the control over which the mouse is over by using the
getWindowFromPoint Api. The window handle returned can be compared to a
selected list of controls and If it happens to be the the control you are
looking for, you could show a tool tip on it using a form with a lable
control on it.
But, the question is why would you like to show a tool tip on a scroll bar.
Are you trying to let the user know that they need to scroll up or down. In
that case you might need a different approach which is a little bit more
intuitive.
Hope This helps
Bilal M. Abbasi
Quote:
>Does anyone know how to determine mouse position (x,y) when over an
>integral scrollbar on a control? I am trying to have a tooltip-like label
>on the scrollbar that will show an item (.toprow) in a flexgrid when I am
>scrolling with the mouse, like in Quicken. The events for the mshflexgrid
>do not fire over the scroll bar, and neither do the ones for the form.
>If you try to set the scrollbar property for the grid to false and use
>a separate scrollbar, the grid will not scroll. Also, the scrollbar
>controls do not have any mouse position detecting events. Any Ideas?
>--
>Chad