Re: Lock the mouse over buttons



On 23 sep, 16:58, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:
Not clear what you mean by this question.

If you want to "lock" the mouse so that it cannot be moved from a control, you can
ClipCursor to the GetWindowRect value of that window.  But then you say you want to "ask
Windows if there is any kind of control under the mouse".  That's a totally different and
completely unrelated question.  

In that case, you would typically do a hook function and hook mouse events, and when you
got a WM_MOUSEMOVE/WM_NCMOUSEMOVE you would do a GetWindowFromPoint or
GetChildWindowFromPoint.  But this is unrelated to "locking" the mouse so it cannot be
moved from a button (which, I might add, is also consider a highly unsocial act).

If you only care about the controls on your app, you can look for WM_MOUSEMOVE or
WM_NCMOUSEMOVE messages using a PreTranslateMessage function (one of the few actual
legitimate uses of this function) and therefore won't need a hook.
                                        joe

On Tue, 23 Sep 2008 03:50:55 -0700 (PDT), videomanlib <videoman...@xxxxxxxxx> wrote:
Hello,
I need to lock the mouse over all the buttons, menus and icons
presented in the screen, not just the controls of my app but all the
controls.  What I mean is that I have to ask windows  if there is any
kind of control (button,menu,icon, combo box) in the point of the
screen under the mouse pointer?
Do you know if this can be done and how?
I don't know how to search for that, I tried to search with these
terms
lock mouse buttons
control localization
Thanks

Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm

Thanks Joseph
Yes you are right, may be I was not very sure about what I wanted to
do. Now I know the way to go.
I was thinking on an accessibility option to help an eye tracking
system. This way it would be easier for the user to fix the mouse over
small icons or buttons. Not an unsocial act at all :).
.



Relevant Pages

  • Re: older games dont work
    ... the support of my work have it and will burn a CD to me. ... and any other tips to make this game works will be great. ... Windows 95 including but not limited to: ... to map a pedal as a control ...
    (microsoft.public.windowsxp.games)
  • Re: Listing of XP tools commands
    ... All files with a .cpl extension are normally invoked via the Control ... IP Configuration - ipconfi/all ... Logs You Out Of Windows - logoff... ... System File Checker Utility - sfc /revert ...
    (microsoft.public.windowsxp.general)
  • Re: Listing of XP tools commands
    ... All files with a .cpl extension are normally invoked via the Control ... IP Configuration - ipconfi/all ... Logs You Out Of Windows - logoff... ... System File Checker Utility - sfc /revert ...
    (microsoft.public.windowsxp.general)
  • Re: Listing of XP tools commands
    ... All files with a .cpl extension are normally invoked via the Control ... IP Configuration - ipconfi/all ... Logs You Out Of Windows - logoff... ... System File Checker Utility - sfc /revert ...
    (microsoft.public.windowsxp.general)
  • Re: Listing of XP tools commands
    ... [I found that page in a few seconds by Googling "run commands winxp", ... All files with a .cpl extension are normally invoked via the Control ... Logs You Out Of Windows - logoff... ... System File Checker Utility - sfc /revert ...
    (microsoft.public.windowsxp.general)