Translate menus after creation of JAWS menu
[xboard.git] / winboard / winboard.c
index e37c629..3e889d8 100644 (file)
@@ -766,6 +766,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
   }\r
 \r
   JAWS_INIT\r
+  TranslateMenus(1);\r
 \r
 //  InitCommonControlsEx(&ex);\r
   InitCommonControls();\r
@@ -1060,7 +1061,6 @@ InitInstance(HINSTANCE hInstance, int nCmdShow, LPSTR lpCmdLine)
   }\r
 \r
   InitDrawingSizes(boardSize, 0);\r
-  TranslateMenus(1);\r
   InitMenuChecks();\r
   buttonCount = GetSystemMetrics(SM_CMOUSEBUTTONS);\r
 \r
@@ -6901,7 +6901,8 @@ ConsoleTextSubclass(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
       SendMessage(hInput, message, wParam, lParam);\r
     }\r
     return 0;\r
-   } // [HGM] navigate: for Ctrl+R, flow into nex case (moved up here) to summon up menu\r
+   } // [HGM] navigate: for Ctrl+R, flow into next case (moved up here) to summon up menu\r
+   lParam = -1;\r
   case WM_RBUTTONDOWN:\r
     if (!(GetKeyState(VK_SHIFT) & ~1)) {\r
       /* Move selection here if it was empty */\r
@@ -6910,7 +6911,7 @@ ConsoleTextSubclass(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
       pt.y = HIWORD(lParam);\r
       SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);\r
       if (sel.cpMin == sel.cpMax) {\r
-        sel.cpMin = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&pt); /*doc is wrong*/\r
+        if(lParam != -1) sel.cpMin = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&pt); /*doc is wrong*/\r
        sel.cpMax = sel.cpMin;\r
        SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&sel);\r
       }\r