Revision: 8594 https://osdn.net/projects/ttssh2/scm/svn/commits/8594 Author: zmatsuo Date: 2020-03-13 00:51:55 +0900 (Fri, 13 Mar 2020) Log Message: ----------- layer_for_unicode に _CallWindowProcW() を追加 - CallWindowProcA() を使用すると ANSI Window になってしまう Modified Paths: -------------- trunk/teraterm/common/compat_win.cpp trunk/teraterm/common/compat_win.h trunk/teraterm/common/layer_for_unicode.cpp trunk/teraterm/common/layer_for_unicode.h -------------- next part -------------- Modified: trunk/teraterm/common/compat_win.cpp =================================================================== --- trunk/teraterm/common/compat_win.cpp 2020-03-12 13:52:38 UTC (rev 8593) +++ trunk/teraterm/common/compat_win.cpp 2020-03-12 15:51:55 UTC (rev 8594) @@ -68,6 +68,7 @@ HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam); LONG_PTR (WINAPI *pSetWindowLongPtrW)(HWND hWnd, int nIndex, LONG_PTR dwNewLong); +LRESULT (WINAPI *pCallWindowProcW)(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // gdi32.lib int (WINAPI *pAddFontResourceExW)(LPCWSTR name, DWORD fl, PVOID res); @@ -161,6 +162,7 @@ { "GetWindowTextW", (void **)&pGetWindowTextW }, { "GetWindowTextLengthW", (void **)&pGetWindowTextLengthW }, { "SetWindowLongPtrW", (void **)&pSetWindowLongPtrW }, + { "CallWindowProcW", (void **)&pCallWindowProcW }, #endif { "EnumDisplayMonitors", (void **)&pEnumDisplayMonitors }, { "MonitorFromWindow", (void **)&pMonitorFromWindow }, Modified: trunk/teraterm/common/compat_win.h =================================================================== --- trunk/teraterm/common/compat_win.h 2020-03-12 13:52:38 UTC (rev 8593) +++ trunk/teraterm/common/compat_win.h 2020-03-12 15:51:55 UTC (rev 8594) @@ -115,6 +115,8 @@ extern int (WINAPI *pGetWindowTextLengthW)(HWND hWnd); extern BOOL (WINAPI *pShell_NotifyIconW)(DWORD dwMessage, NOTIFYICONDATAW *lpData); extern LONG_PTR (WINAPI *pSetWindowLongPtrW)(HWND hWnd, int nIndex, LONG_PTR dwNewLong); +extern LRESULT (WINAPI *pCallWindowProcW)(WNDPROC lpPrevWndFunc, + HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); void WinCompatInit(); Modified: trunk/teraterm/common/layer_for_unicode.cpp =================================================================== --- trunk/teraterm/common/layer_for_unicode.cpp 2020-03-12 13:52:38 UTC (rev 8593) +++ trunk/teraterm/common/layer_for_unicode.cpp 2020-03-12 15:51:55 UTC (rev 8594) @@ -526,3 +526,10 @@ return SetWindowLongPtr(hWnd, nIndex, dwNewLong); } +LRESULT _CallWindowProcW(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +{ + if (pCallWindowProcW != NULL) { + return pCallWindowProcW(lpPrevWndFunc, hWnd, Msg, wParam, lParam); + } + return CallWindowProcA(lpPrevWndFunc, hWnd, Msg, wParam, lParam); +} Modified: trunk/teraterm/common/layer_for_unicode.h =================================================================== --- trunk/teraterm/common/layer_for_unicode.h 2020-03-12 13:52:38 UTC (rev 8593) +++ trunk/teraterm/common/layer_for_unicode.h 2020-03-12 15:51:55 UTC (rev 8594) @@ -109,6 +109,7 @@ int _GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount); int _GetWindowTextLengthW(HWND hWnd); LONG_PTR _SetWindowLongPtrW(HWND hWnd, int nIndex, LONG_PTR dwNewLong); +LRESULT _CallWindowProcW(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // gdi32.lib int _AddFontResourceW(LPCWSTR lpFileName);