diff src/os_win32.c @ 3010:e5b17a5f6516 v7.3.277

updated for version 7.3.277 Problem: MS-Windows: some characters do not show in dialogs. Solution: Use the wide methods when available. (Yanwei Jia)
author Bram Moolenaar <bram@vim.org>
date Wed, 10 Aug 2011 17:08:03 +0200
parents bf283e37792b
children 07bc2ccfe555
line wrap: on
line diff
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -152,6 +152,14 @@ static PFNGCKLN    s_pfnGetConsoleKeyboa
 # define wcsicmp(a, b) wcscmpi((a), (b))
 #endif
 
+/* Enable common dialogs input unicode from IME if posible. */
+#ifdef FEAT_MBYTE
+LRESULT (WINAPI *pDispatchMessage)(LPMSG) = DispatchMessage;
+BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage;
+BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage;
+BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage;
+#endif
+
 #ifndef FEAT_GUI_W32
 /* Win32 Console handles for input and output */
 static HANDLE g_hConIn  = INVALID_HANDLE_VALUE;
@@ -3284,10 +3292,10 @@ mch_system_classic(char *cmd, int option
 	{
 	    MSG	msg;
 
-	    if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
+	    if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
 	    {
 		TranslateMessage(&msg);
-		DispatchMessage(&msg);
+		pDispatchMessage(&msg);
 	    }
 	    if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT)
 		break;