diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-26 11:28:57 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-30 11:23:41 +0200 |
commit | 362a21d3a129b90149f6ef645c127f5e86e0ba61 (patch) | |
tree | 8583cb29b33de56e4489cb8950d2714a1fb2957e /vcl/opengl | |
parent | 81ce629c9e8a4fc26ded9d49157e3f3263991e03 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/win/gdiimpl.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
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); |