|
-
January 13th, 2012, 05:48 AM
#1
How to disable default push button message handling
Hi all,
I have several edit controls and buttons on an edit control. When a number is entered and the user press enter i would like that nothing would happen.
So i would like to disable the default push button control handling. How could i do this? I found only how to do it for MFC.
Thanks.
-
January 13th, 2012, 07:32 AM
#2
Re: How to disable default push button message handling
Subclass the edit control and handle WM_GETDLGCODE message in its window procedure.
-
January 13th, 2012, 09:30 AM
#3
Re: How to disable default push button message handling
So i would like to disable the default push button control handling.
Well, did you try to unset default attribute for the button?
Best regards,
Igor
-
January 17th, 2012, 09:00 AM
#4
Re: How to disable default push button message handling
 Originally Posted by Igor Vartanov
Well, did you try to unset default attribute for the button?
No. I wasn't aware about this option. That worked. Thanks.
PS: I found alternative way to do:
SendMessage(hwndDlg,DM_SETDEFID,IDOK,0);
and to ensure that there is no IDOK control in the dialog box.
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
|