From 362a21d3a129b90149f6ef645c127f5e86e0ba61 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 26 Sep 2017 11:28:57 +0300 Subject: Use explicit function names for fooA/fooW WinAPI; prefer fooW We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- vcl/opengl/win/gdiimpl.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vcl/opengl') diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx index d81c37283983..0d2a0c0a8f0c 100644 --- a/vcl/opengl/win/gdiimpl.cxx +++ b/vcl/opengl/win/gdiimpl.cxx @@ -183,7 +183,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l case WM_DESTROY: return 0; default: - return DefWindowProc(hwnd, message, wParam, lParam); + return DefWindowProcW(hwnd, message, wParam, lParam); } } @@ -193,7 +193,7 @@ bool InitTempWindow(HWND& hwnd, int width, int height, const PIXELFORMATDESCRIPT PIXELFORMATDESCRIPTOR pfd = inPfd; int ret; - WNDCLASS wc; + WNDCLASSW wc; wc.style = 0; wc.lpfnWndProc = WndProc; wc.cbClsExtra = wc.cbWndExtra = 0; @@ -202,9 +202,9 @@ bool InitTempWindow(HWND& hwnd, int width, int height, const PIXELFORMATDESCRIPT wc.hCursor = nullptr; wc.hbrBackground = nullptr; wc.lpszMenuName = nullptr; - wc.lpszClassName = "GLRenderer"; - RegisterClass(&wc); - hwnd = CreateWindow(wc.lpszClassName, nullptr, WS_DISABLED, 0, 0, width, height, nullptr, nullptr, wc.hInstance, nullptr); + wc.lpszClassName = L"GLRenderer"; + RegisterClassW(&wc); + hwnd = CreateWindowW(wc.lpszClassName, nullptr, WS_DISABLED, 0, 0, width, height, nullptr, nullptr, wc.hInstance, nullptr); glWin.hDC = GetDC(hwnd); int nPixelFormat = ChoosePixelFormat(glWin.hDC, &pfd); -- cgit