From 2b1e44036f85d295b29f436c22ff31eb95290012 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 11 Nov 2018 22:56:42 +0100 Subject: Fix encoding of "title" label in win32 native file dialog Fixed bugs - https://bugs.launchpad.net/inkscape/+bug/1802726 --- src/ui/dialog/filedialogimpl-win32.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp index 4380eebfd..dbe84ea38 100644 --- a/src/ui/dialog/filedialogimpl-win32.cpp +++ b/src/ui/dialog/filedialogimpl-win32.cpp @@ -1878,10 +1878,13 @@ UINT_PTR CALLBACK FileSaveDialogImplWin32::GetSaveFileName_hookproc( pImpl = reinterpret_cast(ofn->lCustData); // Create the Title label and edit control - pImpl->_title_label = CreateWindowEx(0, "STATIC", _("Title:"), + wchar_t *title_label_str = (wchar_t *)g_utf8_to_utf16(_("Title:"), -1, NULL, NULL, NULL); + pImpl->_title_label = CreateWindowExW(0, L"STATIC", title_label_str, WS_VISIBLE|WS_CHILD, CW_USEDEFAULT, CW_USEDEFAULT, rCB1.left-rST.left, rST.bottom-rST.top, hParentWnd, NULL, hInstance, NULL); + g_free(title_label_str); + if(pImpl->_title_label) { if(dlgFont) SendMessage(pImpl->_title_label, WM_SETFONT, (WPARAM)dlgFont, MAKELPARAM(FALSE, 0)); SetWindowPos(pImpl->_title_label, NULL, rST.left-rROOT.left, rST.top+ydelta-rROOT.top, -- cgit v1.2.3