TAB doesn't work for controls anymore

Rein Klazes rklazes at xs4all.nl
Sun May 18 06:12:32 CDT 2003


On Sat, 17 May 2003 23:05:17 +0200, you wrote:

> Since a few days I noticed that you can't use TAB anymore to cycle through
> controls. I noticed that when using Forte Agent, because I can't use the
> keyboard to switch from To: to Subject and so on. Any ideas what has been
> changed?

Vitaliy's edit patch again. Vitaliy: here is another case where windows
does not return the DLGC_WANTMESSAGE flag.

Changelog:
	controls/ : edit.c
	revert the WM_GETDLGCODE handling patch completely this time. It
	breaks too much.

Rein.
-- 
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- wine/controls/edit.c	2003-05-15 17:02:59.000000000 +0200
+++ mywine/controls/edit.c	2003-05-18 12:59:28.000000000 +0200
@@ -745,18 +745,21 @@
 
 	case WM_GETDLGCODE:
 		result = DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS;
-                if( es->hwndListBox )
-                {
-                    if (lParam && (((LPMSG)lParam)->message == WM_KEYDOWN))
-                    {
-                       int vk = (int)((LPMSG)lParam)->wParam;
-                       if( vk == VK_RETURN || vk == VK_ESCAPE)
-                           if( SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0))
-                                result |= DLGC_WANTMESSAGE;
-                    }
-		} else
-                    /* It seems in all other cases Windows has this set: */
-                    result |= DLGC_WANTMESSAGE;
+
+		if (lParam && (((LPMSG)lParam)->message == WM_KEYDOWN))
+		{
+		   int vk = (int)((LPMSG)lParam)->wParam;
+
+		   if (vk == VK_RETURN && (GetWindowLongW( hwnd, GWL_STYLE ) & ES_WANTRETURN))
+		   {
+		      result |= DLGC_WANTMESSAGE;
+		   }
+		   else if (es->hwndListBox && (vk == VK_RETURN || vk == VK_ESCAPE))
+		   {
+		      if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0))
+		         result |= DLGC_WANTMESSAGE;
+		   }
+		}
 		break;
 
         case WM_IME_CHAR:


More information about the wine-patches mailing list