This one does the trick! Interesting enough I had the same thing in my tree. I was just running different apps to see if it still works before submitting the patch.
Only one last question remains "What wParam is doing there? And what that other flag does?" When that flag is set, edit control does not react to [enter]. At the same time [enter] is not making it to the default button. So I guess we'll see what's gonna break after this patch will make it into the CVS tree. :-)
Vitaliy Margolen
Wednesday, May 21, 2003, 10:59:14, Vitaliy Margolen wrote:
On Sun, 18 May 2003 11:54:36 -0600, you wrote:
I am looking into it. It looks odd, but windows, at least Win2k, does return DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS | DLGC_WANTMESSAGE always! But there is something more going on here. Windows checks for wParam, and if it's not null adds 0x4 to some window/class flag. If this flag is set, control does not react to [ENTER].
I'm trying to find out what this flag is and what wParam is, since it is "currently unused" according to MSDN.
Here is a part of code from windows:
if (wParam) wnd[0x62] |= 0x4; return DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS | DLGC_WANTMESSAGE;
OK, I looked at it now, tried your example program and did some tests. What you say is more or less true, but only for a multiline edit control. Since our EditWndProc is called for both single as multiline edit controls we must test for it. This patch fixes your example and doesn't seem to affect my programs. What do you think?
Changelog: controls/ : edit.c A WM_GETDLGCODE message always returns the DLGC_WANTMESSAGE flag for multi-line edit controls.
Rein.