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.
Re: How to disable default push button message handling
Subclass the edit control and handle WM_GETDLGCODE message in its window procedure.
Re: How to disable default push button message handling
Quote:
So i would like to disable the default push button control handling.
Well, did you try to unset default attribute for the button?
Re: How to disable default push button message handling
Quote:
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.