Determining Mouse pos over scrollbar? 
Author Message
 Determining Mouse pos over scrollbar?

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



Wed, 20 Jun 2001 03:00:00 GMT  
 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




Wed, 20 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Determining Mouse pos over scrollbar?

2. Determining Mouse pos over scrollbar?

3. Determine file pos in IDE

4. Detecting Mouse Pos on other apps

5. mouse pos

6. Getting mouse pos

7. Mouse over Scrollbar

8. Mouse over scrollbar

9. Flash Scrollbar or Change Scrollbar Color

10. When the Treeview scrollbar moves the FlexGrid Scrollbar should also move

11. Determining mouse position x y

12. How to determine the current mouse cursor

 

 
Powered by phpBB® Forum Software