From 84b5cac8e0f148250c44fc91d7d9752dca13dbb6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 May 2015 17:16:36 +0000 Subject: - MS_UTILS_GETBITMAPFILTERSTRINGS - end of story, replaced with BmpFilterGetStrings(); - parasite mir_strncat's removed from bitmap filter creation; - CMString::AllocSysString/SetSysString removed due to complete uselessness; - CMString::Detouch - typo fixed. git-svn-id: http://svn.miranda-ng.org/main/trunk@13881 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdclist/src/clcopts.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index 83e9154511..2350d7d947 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -334,24 +334,23 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, } case WM_COMMAND: if (LOWORD(wParam) == IDC_BROWSE) { - char str[MAX_PATH]; - OPENFILENAMEA ofn = { 0 }; - char filter[512]; + TCHAR str[MAX_PATH], filter[512]; + GetDlgItemText(hwndDlg, IDC_FILENAME, str, SIZEOF(str)); - GetDlgItemTextA(hwndDlg, IDC_FILENAME, str, SIZEOF(str)); + OPENFILENAME ofn = { 0 }; ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; ofn.hwndOwner = hwndDlg; ofn.hInstance = NULL; - CallService(MS_UTILS_GETBITMAPFILTERSTRINGS, SIZEOF(filter), (LPARAM) filter); + BmpFilterGetStrings(filter, SIZEOF(filter)); ofn.lpstrFilter = filter; ofn.lpstrFile = str; ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; ofn.nMaxFile = SIZEOF(str); ofn.nMaxFileTitle = MAX_PATH; - ofn.lpstrDefExt = "bmp"; - if (!GetOpenFileNameA(&ofn)) + ofn.lpstrDefExt = _T("bmp"); + if (!GetOpenFileName(&ofn)) break; - SetDlgItemTextA(hwndDlg, IDC_FILENAME, str); + SetDlgItemText(hwndDlg, IDC_FILENAME, str); } else if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE) break; -- cgit v1.2.3