Re: Re[2]: TAB doesn't work for controls anymore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xs4all.nl
--- 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;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux