TAB doesn't work for controls anymore

Rein Klazes rklazes at xs4all.nl
Wed May 21 11:59:14 CDT 2003


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.
-- 
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- wine/controls/edit.c	2003-05-21 13:04:21.000000000 +0200
+++ mywine/controls/edit.c	2003-05-21 17:54:49.000000000 +0200
@@ -744,8 +744,12 @@
          */
 
 	case WM_GETDLGCODE:
+                if( es->style & ES_MULTILINE) {
+                    result = DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS |
+                        DLGC_WANTMESSAGE;
+                    break;
+                }
 		result = DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS;
-
 		if (lParam && (((LPMSG)lParam)->message == WM_KEYDOWN))
 		{
 		   int vk = (int)((LPMSG)lParam)->wParam;


More information about the wine-devel mailing list