|
-
January 22nd, 2010, 11:18 AM
#1
Disable mosue movement when user entering data in an edit box
Hi All,
I want to disable the mosue movement in a MFC view application if the control is in an edit box and user entering data in the edit box. I want to get back the mouse movement once user presses enter key in the edit box, can anybody tell me how can I do this in MFC view application
-
January 22nd, 2010, 11:54 AM
#2
Re: Disable mosue movement when user entering data in an edit box
-
January 22nd, 2010, 12:16 PM
#3
Re: Disable mosue movement when user entering data in an edit box
I assume this is for some sort of public console. I think it would be better if you left the mouse alone and did a normal dialog type operation - disable the other windows and then reenable them after you are done with the edit control.
Add in preventing KillFocus so the user cannot exit the edit control until CR is hit and you are all set.
-
January 24th, 2010, 08:24 AM
#4
Re: Disable mosue movement when user entering data in an edit box
Use SetCapture so the edit box gets all the mouseclicks (which you need to ignore) , and use SetCursor to set the mousecursor to none (no image). The user doesn't see the cursor (although it is there), and all the clicks are rerouted to your editbox (where you ignore the clicks)... effectively the user can't use the mouse . Use ReleaseCapture to 'free' the mouseclicks and give the mousecursor a image again, so the user can use the mouse again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|