Commit fe0c5cb6 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wineconsole: Use the explicit W types/functions in dialog.c.

parent f6217640
...@@ -65,23 +65,23 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -65,23 +65,23 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
case WM_INITDIALOG: case WM_INITDIALOG:
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam; di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
di->hDlg = hDlg; di->hDlg = hDlg;
SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)di); SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)di);
SendMessage(GetDlgItem(hDlg,IDC_OPT_HIST_SIZE_UD), UDM_SETRANGE, 0, MAKELPARAM (500, 0)); SendMessageW(GetDlgItem(hDlg,IDC_OPT_HIST_SIZE_UD), UDM_SETRANGE, 0, MAKELPARAM(500, 0));
if (di->config.cursor_size <= 25) idc = IDC_OPT_CURSOR_SMALL; if (di->config.cursor_size <= 25) idc = IDC_OPT_CURSOR_SMALL;
else if (di->config.cursor_size <= 50) idc = IDC_OPT_CURSOR_MEDIUM; else if (di->config.cursor_size <= 50) idc = IDC_OPT_CURSOR_MEDIUM;
else idc = IDC_OPT_CURSOR_LARGE; else idc = IDC_OPT_CURSOR_LARGE;
SendDlgItemMessage(hDlg, idc, BM_SETCHECK, BST_CHECKED, 0L); SendDlgItemMessageW(hDlg, idc, BM_SETCHECK, BST_CHECKED, 0);
SetDlgItemInt(hDlg, IDC_OPT_HIST_SIZE, di->config.history_size, FALSE); SetDlgItemInt(hDlg, IDC_OPT_HIST_SIZE, di->config.history_size, FALSE);
SendDlgItemMessage(hDlg, IDC_OPT_HIST_NODOUBLE, BM_SETCHECK, SendDlgItemMessageW(hDlg, IDC_OPT_HIST_NODOUBLE, BM_SETCHECK,
(di->config.history_nodup) ? BST_CHECKED : BST_UNCHECKED, 0L); (di->config.history_nodup) ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hDlg, IDC_OPT_CONF_CTRL, BM_SETCHECK, SendDlgItemMessageW(hDlg, IDC_OPT_CONF_CTRL, BM_SETCHECK,
(di->config.menu_mask & MK_CONTROL) ? BST_CHECKED : BST_UNCHECKED, 0L); (di->config.menu_mask & MK_CONTROL) ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hDlg, IDC_OPT_CONF_SHIFT, BM_SETCHECK, SendDlgItemMessageW(hDlg, IDC_OPT_CONF_SHIFT, BM_SETCHECK,
(di->config.menu_mask & MK_SHIFT) ? BST_CHECKED : BST_UNCHECKED, 0L); (di->config.menu_mask & MK_SHIFT) ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hDlg, IDC_OPT_QUICK_EDIT, BM_SETCHECK, SendDlgItemMessageW(hDlg, IDC_OPT_QUICK_EDIT, BM_SETCHECK,
(di->config.quick_edit) ? BST_CHECKED : BST_UNCHECKED, 0L); (di->config.quick_edit) ? BST_CHECKED : BST_UNCHECKED, 0);
return FALSE; /* because we set the focus */ return FALSE; /* because we set the focus */
case WM_COMMAND: case WM_COMMAND:
break; break;
...@@ -91,7 +91,7 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -91,7 +91,7 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
DWORD val; DWORD val;
BOOL done; BOOL done;
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER); di = (struct dialog_info*)GetWindowLongPtrW(hDlg, DWLP_USER);
switch (nmhdr->code) switch (nmhdr->code)
{ {
...@@ -106,7 +106,7 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -106,7 +106,7 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
idc = IDC_OPT_CURSOR_MEDIUM; idc = IDC_OPT_CURSOR_MEDIUM;
else else
idc = IDC_OPT_CURSOR_LARGE; idc = IDC_OPT_CURSOR_LARGE;
PostMessage(hDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hDlg, idc), TRUE); PostMessageW(hDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hDlg, idc), TRUE);
di->hDlg = hDlg; di->hDlg = hDlg;
break; break;
case PSN_APPLY: case PSN_APPLY:
...@@ -129,7 +129,7 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -129,7 +129,7 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
val = (IsDlgButtonChecked(hDlg, IDC_OPT_QUICK_EDIT) & BST_CHECKED) ? TRUE : FALSE; val = (IsDlgButtonChecked(hDlg, IDC_OPT_QUICK_EDIT) & BST_CHECKED) ? TRUE : FALSE;
di->config.quick_edit = val; di->config.quick_edit = val;
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR); SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
return TRUE; return TRUE;
default: default:
return FALSE; return FALSE;
...@@ -152,12 +152,12 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -152,12 +152,12 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
switch (msg) switch (msg)
{ {
case WM_CREATE: case WM_CREATE:
SetWindowLongPtr(hWnd, 0, 0); SetWindowLongPtrW(hWnd, 0, 0);
break; break;
case WM_GETFONT: case WM_GETFONT:
return GetWindowLongPtr(hWnd, 0); return GetWindowLongPtrW(hWnd, 0);
case WM_SETFONT: case WM_SETFONT:
SetWindowLongPtr(hWnd, 0, wParam); SetWindowLongPtrW(hWnd, 0, wParam);
if (LOWORD(lParam)) if (LOWORD(lParam))
{ {
InvalidateRect(hWnd, NULL, TRUE); InvalidateRect(hWnd, NULL, TRUE);
...@@ -166,7 +166,7 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -166,7 +166,7 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
break; break;
case WM_DESTROY: case WM_DESTROY:
{ {
HFONT hFont = (HFONT)GetWindowLongPtr(hWnd, 0L); HFONT hFont = (HFONT)GetWindowLongPtrW(hWnd, 0);
if (hFont) DeleteObject(hFont); if (hFont) DeleteObject(hFont);
} }
break; break;
...@@ -178,13 +178,13 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -178,13 +178,13 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
struct dialog_info* di; struct dialog_info* di;
HFONT hFont, hOldFont; HFONT hFont, hOldFont;
di = (struct dialog_info*)GetWindowLongPtr(GetParent(hWnd), DWLP_USER); di = (struct dialog_info*)GetWindowLongPtrW(GetParent(hWnd), DWLP_USER);
BeginPaint(hWnd, &ps); BeginPaint(hWnd, &ps);
font_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L); font_idx = SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0, 0);
size_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0L, 0L); size_idx = SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0, 0);
hFont = (HFONT)GetWindowLongPtr(hWnd, 0L); hFont = (HFONT)GetWindowLongPtrW(hWnd, 0);
if (hFont) if (hFont)
{ {
WCHAR ascii[] = {'A','S','C','I','I',':',' ','a','b','c','X','Y','Z','\0'}; WCHAR ascii[] = {'A','S','C','I','I',':',' ','a','b','c','X','Y','Z','\0'};
...@@ -192,13 +192,13 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -192,13 +192,13 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
int len; int len;
hOldFont = SelectObject(ps.hdc, hFont); hOldFont = SelectObject(ps.hdc, hFont);
SetBkColor(ps.hdc, WCUSER_ColorMap[GetWindowLong(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)]); SetBkColor(ps.hdc, WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)]);
SetTextColor(ps.hdc, WCUSER_ColorMap[GetWindowLong(GetDlgItem(di->hDlg, IDC_FNT_COLOR_FG), 0)]); SetTextColor(ps.hdc, WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_FG), 0)]);
len = LoadString(GetModuleHandle(NULL), IDS_FNT_PREVIEW, len = LoadStringW(GetModuleHandleW(NULL), IDS_FNT_PREVIEW,
buf, sizeof(buf) / sizeof(buf[0])); buf, sizeof(buf) / sizeof(buf[0]));
if (len) if (len)
TextOut(ps.hdc, 0, 0, buf, len); TextOutW(ps.hdc, 0, 0, buf, len);
TextOut(ps.hdc, 0, di->font[size_idx].height, ascii, TextOutW(ps.hdc, 0, di->font[size_idx].height, ascii,
sizeof(ascii)/sizeof(ascii[0]) - 1); sizeof(ascii)/sizeof(ascii[0]) - 1);
SelectObject(ps.hdc, hOldFont); SelectObject(ps.hdc, hOldFont);
} }
...@@ -206,7 +206,7 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -206,7 +206,7 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
} }
break; break;
default: default:
return DefWindowProc(hWnd, msg, wParam, lParam); return DefWindowProcW(hWnd, msg, wParam, lParam);
} }
return 0L; return 0L;
} }
...@@ -240,7 +240,7 @@ static LRESULT WINAPI WCUSER_ColorPreviewProc(HWND hWnd, UINT msg, WPARAM wParam ...@@ -240,7 +240,7 @@ static LRESULT WINAPI WCUSER_ColorPreviewProc(HWND hWnd, UINT msg, WPARAM wParam
hbr = CreateSolidBrush(WCUSER_ColorMap[i]); hbr = CreateSolidBrush(WCUSER_ColorMap[i]);
FillRect(ps.hdc, &r, hbr); FillRect(ps.hdc, &r, hbr);
DeleteObject(hbr); DeleteObject(hbr);
if (GetWindowLong(hWnd, 0) == i) if (GetWindowLongW(hWnd, 0) == i)
{ {
HPEN hOldPen; HPEN hOldPen;
int i = 2; int i = 2;
...@@ -275,13 +275,13 @@ static LRESULT WINAPI WCUSER_ColorPreviewProc(HWND hWnd, UINT msg, WPARAM wParam ...@@ -275,13 +275,13 @@ static LRESULT WINAPI WCUSER_ColorPreviewProc(HWND hWnd, UINT msg, WPARAM wParam
step = client.right / 8; step = client.right / 8;
i = (HIWORD(lParam) >= client.bottom / 2) ? 8 : 0; i = (HIWORD(lParam) >= client.bottom / 2) ? 8 : 0;
i += LOWORD(lParam) / step; i += LOWORD(lParam) / step;
SetWindowLong(hWnd, 0, i); SetWindowLongW(hWnd, 0, i);
InvalidateRect(GetDlgItem(GetParent(hWnd), IDC_FNT_PREVIEW), NULL, FALSE); InvalidateRect(GetDlgItem(GetParent(hWnd), IDC_FNT_PREVIEW), NULL, FALSE);
InvalidateRect(hWnd, NULL, FALSE); InvalidateRect(hWnd, NULL, FALSE);
} }
break; break;
default: default:
return DefWindowProc(hWnd, msg, wParam, lParam); return DefWindowProcW(hWnd, msg, wParam, lParam);
} }
return 0L; return 0L;
} }
...@@ -291,7 +291,7 @@ static LRESULT WINAPI WCUSER_ColorPreviewProc(HWND hWnd, UINT msg, WPARAM wParam ...@@ -291,7 +291,7 @@ static LRESULT WINAPI WCUSER_ColorPreviewProc(HWND hWnd, UINT msg, WPARAM wParam
* *
* enumerates all the font names with at least one valid font * enumerates all the font names with at least one valid font
*/ */
static int CALLBACK font_enum_size2(const LOGFONT* lf, const TEXTMETRIC* tm, static int CALLBACK font_enum_size2(const LOGFONTW* lf, const TEXTMETRICW* tm,
DWORD FontType, LPARAM lParam) DWORD FontType, LPARAM lParam)
{ {
struct dialog_info* di = (struct dialog_info*)lParam; struct dialog_info* di = (struct dialog_info*)lParam;
...@@ -305,7 +305,7 @@ static int CALLBACK font_enum_size2(const LOGFONT* lf, const TEXTMETRIC* tm, ...@@ -305,7 +305,7 @@ static int CALLBACK font_enum_size2(const LOGFONT* lf, const TEXTMETRIC* tm,
return 1; return 1;
} }
static int CALLBACK font_enum(const LOGFONT* lf, const TEXTMETRIC* tm, static int CALLBACK font_enum(const LOGFONTW* lf, const TEXTMETRICW* tm,
DWORD FontType, LPARAM lParam) DWORD FontType, LPARAM lParam)
{ {
struct dialog_info* di = (struct dialog_info*)lParam; struct dialog_info* di = (struct dialog_info*)lParam;
...@@ -316,14 +316,14 @@ static int CALLBACK font_enum(const LOGFONT* lf, const TEXTMETRIC* tm, ...@@ -316,14 +316,14 @@ static int CALLBACK font_enum(const LOGFONT* lf, const TEXTMETRIC* tm,
if (FontType & RASTER_FONTTYPE) if (FontType & RASTER_FONTTYPE)
{ {
di->nFont = 0; di->nFont = 0;
EnumFontFamilies(PRIVATE(di->data)->hMemDC, lf->lfFaceName, font_enum_size2, (LPARAM)di); EnumFontFamiliesW(PRIVATE(di->data)->hMemDC, lf->lfFaceName, font_enum_size2, (LPARAM)di);
} }
else else
di->nFont = 1; di->nFont = 1;
if (di->nFont) if (di->nFont)
{ {
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_ADDSTRING, SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_ADDSTRING,
0, (LPARAM)lf->lfFaceName); 0, (LPARAM)lf->lfFaceName);
} }
} }
...@@ -336,7 +336,7 @@ static int CALLBACK font_enum(const LOGFONT* lf, const TEXTMETRIC* tm, ...@@ -336,7 +336,7 @@ static int CALLBACK font_enum(const LOGFONT* lf, const TEXTMETRIC* tm,
* *
* *
*/ */
static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm, static int CALLBACK font_enum_size(const LOGFONTW* lf, const TEXTMETRICW* tm,
DWORD FontType, LPARAM lParam) DWORD FontType, LPARAM lParam)
{ {
struct dialog_info* di = (struct dialog_info*)lParam; struct dialog_info* di = (struct dialog_info*)lParam;
...@@ -361,9 +361,9 @@ static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm, ...@@ -361,9 +361,9 @@ static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm,
} }
di->font[i].height = sizes[i]; di->font[i].height = sizes[i];
di->font[i].weight = 400; di->font[i].weight = 400;
lstrcpy(di->font[i].faceName, lf->lfFaceName); lstrcpyW(di->font[i].faceName, lf->lfFaceName);
wsprintf(buf, fmt, sizes[i]); wsprintfW(buf, fmt, sizes[i]);
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_INSERTSTRING, i, (LPARAM)buf); SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_SIZE, LB_INSERTSTRING, i, (LPARAM)buf);
} }
/* don't need to enumerate other */ /* don't need to enumerate other */
return 0; return 0;
...@@ -386,8 +386,8 @@ static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm, ...@@ -386,8 +386,8 @@ static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm,
tm->tmWeight < di->font[idx].weight) tm->tmWeight < di->font[idx].weight)
{ {
/* here we need to add the new entry */ /* here we need to add the new entry */
wsprintf(buf, fmt, tm->tmHeight); wsprintfW(buf, fmt, tm->tmHeight);
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_INSERTSTRING, idx, (LPARAM)buf); SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_SIZE, LB_INSERTSTRING, idx, (LPARAM)buf);
/* now grow our arrays and insert the values at the same index than in the list box */ /* now grow our arrays and insert the values at the same index than in the list box */
if (di->nFont) if (di->nFont)
...@@ -400,7 +400,7 @@ static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm, ...@@ -400,7 +400,7 @@ static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm,
di->font = HeapAlloc(GetProcessHeap(), 0, sizeof(*di->font)); di->font = HeapAlloc(GetProcessHeap(), 0, sizeof(*di->font));
di->font[idx].height = tm->tmHeight; di->font[idx].height = tm->tmHeight;
di->font[idx].weight = tm->tmWeight; di->font[idx].weight = tm->tmWeight;
lstrcpy(di->font[idx].faceName, lf->lfFaceName); lstrcpyW(di->font[idx].faceName, lf->lfFaceName);
di->nFont++; di->nFont++;
} }
} }
...@@ -417,12 +417,12 @@ static BOOL select_font(struct dialog_info* di) ...@@ -417,12 +417,12 @@ static BOOL select_font(struct dialog_info* di)
int font_idx, size_idx; int font_idx, size_idx;
WCHAR buf[256]; WCHAR buf[256];
WCHAR fmt[128]; WCHAR fmt[128];
LOGFONT lf; LOGFONTW lf;
HFONT hFont, hOldFont; HFONT hFont, hOldFont;
struct config_data config; struct config_data config;
font_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L); font_idx = SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0, 0);
size_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0L, 0L); size_idx = SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0, 0);
if (font_idx < 0 || size_idx < 0 || size_idx >= di->nFont) if (font_idx < 0 || size_idx < 0 || size_idx >= di->nFont)
return FALSE; return FALSE;
...@@ -435,15 +435,15 @@ static BOOL select_font(struct dialog_info* di) ...@@ -435,15 +435,15 @@ static BOOL select_font(struct dialog_info* di)
if (config.cell_height != di->font[size_idx].height) if (config.cell_height != di->font[size_idx].height)
WINE_TRACE("mismatched heights (%u<>%u)\n", WINE_TRACE("mismatched heights (%u<>%u)\n",
config.cell_height, di->font[size_idx].height); config.cell_height, di->font[size_idx].height);
hOldFont = (HFONT)SendDlgItemMessage(di->hDlg, IDC_FNT_PREVIEW, WM_GETFONT, 0L, 0L); hOldFont = (HFONT)SendDlgItemMessageW(di->hDlg, IDC_FNT_PREVIEW, WM_GETFONT, 0, 0);
SendDlgItemMessage(di->hDlg, IDC_FNT_PREVIEW, WM_SETFONT, (WPARAM)hFont, TRUE); SendDlgItemMessageW(di->hDlg, IDC_FNT_PREVIEW, WM_SETFONT, (WPARAM)hFont, TRUE);
if (hOldFont) DeleteObject(hOldFont); if (hOldFont) DeleteObject(hOldFont);
LoadString(GetModuleHandle(NULL), IDS_FNT_DISPLAY, fmt, sizeof(fmt) / sizeof(WCHAR)); LoadStringW(GetModuleHandleW(NULL), IDS_FNT_DISPLAY, fmt, sizeof(fmt) / sizeof(fmt[0]));
wsprintf(buf, fmt, config.cell_width, config.cell_height); wsprintfW(buf, fmt, config.cell_width, config.cell_height);
SendDlgItemMessage(di->hDlg, IDC_FNT_FONT_INFO, WM_SETTEXT, 0, (LPARAM)buf); SendDlgItemMessageW(di->hDlg, IDC_FNT_FONT_INFO, WM_SETTEXT, 0, (LPARAM)buf);
return TRUE; return TRUE;
} }
...@@ -458,16 +458,16 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit) ...@@ -458,16 +458,16 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit)
int idx; int idx;
WCHAR lfFaceName[LF_FACESIZE]; WCHAR lfFaceName[LF_FACESIZE];
idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L); idx = SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0, 0);
if (idx < 0) return FALSE; if (idx < 0) return FALSE;
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETTEXT, idx, (LPARAM)lfFaceName); SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_GETTEXT, idx, (LPARAM)lfFaceName);
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_RESETCONTENT, 0L, 0L); SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_SIZE, LB_RESETCONTENT, 0, 0);
HeapFree(GetProcessHeap(), 0, di->font); HeapFree(GetProcessHeap(), 0, di->font);
di->nFont = 0; di->nFont = 0;
di->font = NULL; di->font = NULL;
EnumFontFamilies(PRIVATE(di->data)->hMemDC, lfFaceName, font_enum_size, (LPARAM)di); EnumFontFamiliesW(PRIVATE(di->data)->hMemDC, lfFaceName, font_enum_size, (LPARAM)di);
if (doInit) if (doInit)
{ {
...@@ -475,7 +475,7 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit) ...@@ -475,7 +475,7 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit)
for (idx = 0; idx < di->nFont; idx++) for (idx = 0; idx < di->nFont; idx++)
{ {
if (!lstrcmp(di->font[idx].faceName, di->config.face_name) && if (!lstrcmpW(di->font[idx].faceName, di->config.face_name) &&
di->font[idx].height == di->config.cell_height && di->font[idx].height == di->config.cell_height &&
di->font[idx].weight == di->config.font_weight) di->font[idx].weight == di->config.font_weight)
{ {
...@@ -487,7 +487,7 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit) ...@@ -487,7 +487,7 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit)
} }
else else
idx = 0; idx = 0;
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_SETCURSEL, idx, 0L); SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_SIZE, LB_SETCURSEL, idx, 0);
select_font(di); select_font(di);
return TRUE; return TRUE;
} }
...@@ -499,11 +499,11 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit) ...@@ -499,11 +499,11 @@ static BOOL fill_list_size(struct dialog_info* di, BOOL doInit)
*/ */
static BOOL fill_list_font(struct dialog_info* di) static BOOL fill_list_font(struct dialog_info* di)
{ {
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_RESETCONTENT, 0L, 0L); SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_RESETCONTENT, 0, 0);
EnumFontFamilies(PRIVATE(di->data)->hMemDC, NULL, font_enum, (LPARAM)di); EnumFontFamiliesW(PRIVATE(di->data)->hMemDC, NULL, font_enum, (LPARAM)di);
if (SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_SELECTSTRING, if (SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_SELECTSTRING,
(WPARAM)-1, (LPARAM)di->config.face_name) == LB_ERR) -1, (LPARAM)di->config.face_name) == LB_ERR)
SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_SETCURSEL, 0L, 0L); SendDlgItemMessageW(di->hDlg, IDC_FNT_LIST_FONT, LB_SETCURSEL, 0, 0);
fill_list_size(di, TRUE); fill_list_size(di, TRUE);
return TRUE; return TRUE;
} }
...@@ -522,15 +522,15 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA ...@@ -522,15 +522,15 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA
case WM_INITDIALOG: case WM_INITDIALOG:
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam; di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
di->hDlg = hDlg; di->hDlg = hDlg;
SetWindowLongPtr(hDlg, DWLP_USER, (DWORD_PTR)di); SetWindowLongPtrW(hDlg, DWLP_USER, (DWORD_PTR)di);
/* remove dialog from this control, font will be reset when listboxes are filled */ /* remove dialog from this control, font will be reset when listboxes are filled */
SendDlgItemMessage(hDlg, IDC_FNT_PREVIEW, WM_SETFONT, 0L, 0L); SendDlgItemMessageW(hDlg, IDC_FNT_PREVIEW, WM_SETFONT, 0, 0);
fill_list_font(di); fill_list_font(di);
SetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0, (di->config.def_attr >> 4) & 0x0F); SetWindowLongW(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0, (di->config.def_attr >> 4) & 0x0F);
SetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0, di->config.def_attr & 0x0F); SetWindowLongW(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0, di->config.def_attr & 0x0F);
break; break;
case WM_COMMAND: case WM_COMMAND:
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER); di = (struct dialog_info*)GetWindowLongPtrW(hDlg, DWLP_USER);
switch (LOWORD(wParam)) switch (LOWORD(wParam))
{ {
case IDC_FNT_LIST_FONT: case IDC_FNT_LIST_FONT:
...@@ -552,18 +552,18 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA ...@@ -552,18 +552,18 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA
NMHDR* nmhdr = (NMHDR*)lParam; NMHDR* nmhdr = (NMHDR*)lParam;
DWORD val; DWORD val;
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER); di = (struct dialog_info*)GetWindowLongPtrW(hDlg, DWLP_USER);
switch (nmhdr->code) switch (nmhdr->code)
{ {
case PSN_SETACTIVE: case PSN_SETACTIVE:
di->hDlg = hDlg; di->hDlg = hDlg;
break; break;
case PSN_APPLY: case PSN_APPLY:
val = SendDlgItemMessage(hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0L, 0L); val = SendDlgItemMessageW(hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0, 0);
if (val < di->nFont) if (val < di->nFont)
{ {
LOGFONT lf; LOGFONTW lf;
WCUSER_FillLogFont(&lf, di->font[val].faceName, WCUSER_FillLogFont(&lf, di->font[val].faceName,
di->font[val].height, di->font[val].weight); di->font[val].height, di->font[val].weight);
...@@ -571,11 +571,11 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA ...@@ -571,11 +571,11 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA
di->data->hWnd, &lf, NULL)); di->data->hWnd, &lf, NULL));
} }
val = (GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0) << 4) | val = (GetWindowLongW(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0) << 4) |
GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0); GetWindowLongW(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0);
di->config.def_attr = val; di->config.def_attr = val;
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR); SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
return TRUE; return TRUE;
default: default:
return FALSE; return FALSE;
...@@ -604,34 +604,31 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -604,34 +604,31 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam; di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
di->hDlg = hDlg; di->hDlg = hDlg;
SetWindowLongPtr(hDlg, DWLP_USER, (DWORD_PTR)di); SetWindowLongPtrW(hDlg, DWLP_USER, (DWORD_PTR)di);
SetDlgItemInt(hDlg, IDC_CNF_SB_WIDTH, di->config.sb_width, FALSE); SetDlgItemInt(hDlg, IDC_CNF_SB_WIDTH, di->config.sb_width, FALSE);
SetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, di->config.sb_height, FALSE); SetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, di->config.sb_height, FALSE);
SetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, di->config.win_width, FALSE); SetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, di->config.win_width, FALSE);
SetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, di->config.win_height, FALSE); SetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, di->config.win_height, FALSE);
SendMessage(GetDlgItem(hDlg,IDC_CNF_WIN_HEIGHT_UD), UDM_SETRANGE, 0, MAKELPARAM (nMaxUD, 0)); SendMessageW(GetDlgItem(hDlg,IDC_CNF_WIN_HEIGHT_UD), UDM_SETRANGE, 0, MAKELPARAM(nMaxUD, 0));
SendMessage(GetDlgItem(hDlg,IDC_CNF_WIN_WIDTH_UD), UDM_SETRANGE, 0, MAKELPARAM (nMaxUD, 0)); SendMessageW(GetDlgItem(hDlg,IDC_CNF_WIN_WIDTH_UD), UDM_SETRANGE, 0, MAKELPARAM(nMaxUD, 0));
SendMessage(GetDlgItem(hDlg,IDC_CNF_SB_HEIGHT_UD), UDM_SETRANGE, 0, MAKELPARAM (nMaxUD, 0)); SendMessageW(GetDlgItem(hDlg,IDC_CNF_SB_HEIGHT_UD), UDM_SETRANGE, 0, MAKELPARAM(nMaxUD, 0));
SendMessage(GetDlgItem(hDlg,IDC_CNF_SB_WIDTH_UD), UDM_SETRANGE, 0, MAKELPARAM (nMaxUD, 0)); SendMessageW(GetDlgItem(hDlg,IDC_CNF_SB_WIDTH_UD), UDM_SETRANGE, 0, MAKELPARAM(nMaxUD, 0));
SendDlgItemMessage(hDlg, IDC_CNF_CLOSE_EXIT, BM_SETCHECK, SendDlgItemMessageW(hDlg, IDC_CNF_CLOSE_EXIT, BM_SETCHECK,
(di->config.exit_on_die) ? BST_CHECKED : BST_UNCHECKED, 0L); (di->config.exit_on_die) ? BST_CHECKED : BST_UNCHECKED, 0);
{ {
static const WCHAR s1[] = {'W','i','n','3','2',0}; static const WCHAR s1[] = {'W','i','n','3','2',0};
static const WCHAR s2[] = {'E','m','a','c','s',0}; static const WCHAR s2[] = {'E','m','a','c','s',0};
SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_ADDSTRING, SendDlgItemMessageW(hDlg, IDC_CNF_EDITION_MODE, CB_ADDSTRING, 0, (LPARAM)s1);
0, (LPARAM)s1); SendDlgItemMessageW(hDlg, IDC_CNF_EDITION_MODE, CB_ADDSTRING, 0, (LPARAM)s2);
SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_ADDSTRING, SendDlgItemMessageW(hDlg, IDC_CNF_EDITION_MODE, CB_SETCURSEL, di->config.edition_mode, 0);
0, (LPARAM)s2);
SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_SETCURSEL,
di->config.edition_mode, 0);
} }
break; break;
case WM_COMMAND: case WM_COMMAND:
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER); di = (struct dialog_info*)GetWindowLongPtrW(hDlg, DWLP_USER);
switch (LOWORD(wParam)) switch (LOWORD(wParam))
{ {
} }
...@@ -642,7 +639,7 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -642,7 +639,7 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
int win_w, win_h, sb_w, sb_h; int win_w, win_h, sb_w, sb_h;
BOOL st1, st2; BOOL st1, st2;
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER); di = (struct dialog_info*)GetWindowLongPtrW(hDlg, DWLP_USER);
switch (nmhdr->code) switch (nmhdr->code)
{ {
case PSN_SETACTIVE: case PSN_SETACTIVE:
...@@ -653,14 +650,14 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -653,14 +650,14 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
sb_h = GetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, &st2, FALSE); sb_h = GetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, &st2, FALSE);
if (!st1 || ! st2) if (!st1 || ! st2)
{ {
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_INVALID); SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_INVALID);
return TRUE; return TRUE;
} }
win_w = GetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, &st1, FALSE); win_w = GetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, &st1, FALSE);
win_h = GetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, &st2, FALSE); win_h = GetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, &st2, FALSE);
if (!st1 || !st2) if (!st1 || !st2)
{ {
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_INVALID); SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_INVALID);
return TRUE; return TRUE;
} }
if (win_w > sb_w || win_h > sb_h) if (win_w > sb_w || win_h > sb_h)
...@@ -668,13 +665,13 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -668,13 +665,13 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
WCHAR cap[256]; WCHAR cap[256];
WCHAR txt[256]; WCHAR txt[256];
LoadString(GetModuleHandle(NULL), IDS_DLG_TIT_ERROR, LoadStringW(GetModuleHandleW(NULL), IDS_DLG_TIT_ERROR,
cap, sizeof(cap) / sizeof(WCHAR)); cap, sizeof(cap) / sizeof(cap[0]));
LoadString(GetModuleHandle(NULL), IDS_DLG_ERR_SBWINSIZE, LoadStringW(GetModuleHandleW(NULL), IDS_DLG_ERR_SBWINSIZE,
txt, sizeof(txt) / sizeof(WCHAR)); txt, sizeof(txt) / sizeof(cap[0]));
MessageBox(hDlg, txt, cap, MB_OK); MessageBoxW(hDlg, txt, cap, MB_OK);
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_INVALID); SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_INVALID);
return TRUE; return TRUE;
} }
di->config.win_width = win_w; di->config.win_width = win_w;
...@@ -683,9 +680,9 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L ...@@ -683,9 +680,9 @@ static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
di->config.sb_height = sb_h; di->config.sb_height = sb_h;
di->config.exit_on_die = IsDlgButtonChecked(hDlg, IDC_CNF_CLOSE_EXIT) ? 1 : 0; di->config.exit_on_die = IsDlgButtonChecked(hDlg, IDC_CNF_CLOSE_EXIT) ? 1 : 0;
di->config.edition_mode = SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_GETCURSEL, di->config.edition_mode = SendDlgItemMessageW(hDlg, IDC_CNF_EDITION_MODE,
0, 0); CB_GETCURSEL, 0, 0);
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR); SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
return TRUE; return TRUE;
default: default:
return FALSE; return FALSE;
...@@ -709,7 +706,7 @@ static INT_PTR WINAPI WCUSER_SaveDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA ...@@ -709,7 +706,7 @@ static INT_PTR WINAPI WCUSER_SaveDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA
switch (msg) switch (msg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
SendDlgItemMessage(hDlg, IDC_SAV_SESSION, BM_SETCHECK, BST_CHECKED, 0); SendDlgItemMessageW(hDlg, IDC_SAV_SESSION, BM_SETCHECK, BST_CHECKED, 0);
break; break;
case WM_COMMAND: case WM_COMMAND:
switch (LOWORD(wParam)) switch (LOWORD(wParam))
...@@ -737,10 +734,10 @@ static INT_PTR WINAPI WCUSER_SaveDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA ...@@ -737,10 +734,10 @@ static INT_PTR WINAPI WCUSER_SaveDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA
BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current)
{ {
HPROPSHEETPAGE psPage[3]; HPROPSHEETPAGE psPage[3];
PROPSHEETPAGE psp; PROPSHEETPAGEW psp;
PROPSHEETHEADER psHead; PROPSHEETHEADERW psHead;
WCHAR buff[256]; WCHAR buff[256];
WNDCLASS wndclass; WNDCLASSW wndclass;
static const WCHAR szFntPreview[] = {'W','i','n','e','C','o','n','F','o','n','t','P','r','e','v','i','e','w',0}; static const WCHAR szFntPreview[] = {'W','i','n','e','C','o','n','F','o','n','t','P','r','e','v','i','e','w',0};
static const WCHAR szColorPreview[] = {'W','i','n','e','C','o','n','C','o','l','o','r','P','r','e','v','i','e','w',0}; static const WCHAR szColorPreview[] = {'W','i','n','e','C','o','n','C','o','l','o','r','P','r','e','v','i','e','w',0};
struct dialog_info di; struct dialog_info di;
...@@ -771,25 +768,25 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) ...@@ -771,25 +768,25 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current)
wndclass.lpfnWndProc = WCUSER_FontPreviewProc; wndclass.lpfnWndProc = WCUSER_FontPreviewProc;
wndclass.cbClsExtra = 0; wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = sizeof (DWORD_PTR); /* for hFont */ wndclass.cbWndExtra = sizeof (DWORD_PTR); /* for hFont */
wndclass.hInstance = GetModuleHandle(NULL); wndclass.hInstance = GetModuleHandleW(NULL);
wndclass.hIcon = 0; wndclass.hIcon = 0;
wndclass.hCursor = LoadCursor(0, IDC_ARROW); wndclass.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW);
wndclass.hbrBackground = GetStockObject(BLACK_BRUSH); wndclass.hbrBackground = GetStockObject(BLACK_BRUSH);
wndclass.lpszMenuName = NULL; wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szFntPreview; wndclass.lpszClassName = szFntPreview;
RegisterClass(&wndclass); RegisterClassW(&wndclass);
wndclass.style = 0; wndclass.style = 0;
wndclass.lpfnWndProc = WCUSER_ColorPreviewProc; wndclass.lpfnWndProc = WCUSER_ColorPreviewProc;
wndclass.cbClsExtra = 0; wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = sizeof(DWORD); wndclass.cbWndExtra = sizeof(DWORD);
wndclass.hInstance = GetModuleHandle(NULL); wndclass.hInstance = GetModuleHandleW(NULL);
wndclass.hIcon = 0; wndclass.hIcon = 0;
wndclass.hCursor = LoadCursor(0, IDC_ARROW); wndclass.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW);
wndclass.hbrBackground = GetStockObject(BLACK_BRUSH); wndclass.hbrBackground = GetStockObject(BLACK_BRUSH);
wndclass.lpszMenuName = NULL; wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szColorPreview; wndclass.lpszClassName = szColorPreview;
RegisterClass(&wndclass); RegisterClassW(&wndclass);
memset(&psp, 0, sizeof(psp)); memset(&psp, 0, sizeof(psp));
psp.dwSize = sizeof(psp); psp.dwSize = sizeof(psp);
...@@ -797,22 +794,22 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) ...@@ -797,22 +794,22 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current)
psp.hInstance = wndclass.hInstance; psp.hInstance = wndclass.hInstance;
psp.lParam = (LPARAM)&di; psp.lParam = (LPARAM)&di;
psp.u.pszTemplate = MAKEINTRESOURCE(IDD_OPTION); psp.u.pszTemplate = MAKEINTRESOURCEW(IDD_OPTION);
psp.pfnDlgProc = WCUSER_OptionDlgProc; psp.pfnDlgProc = WCUSER_OptionDlgProc;
psPage[0] = CreatePropertySheetPage(&psp); psPage[0] = CreatePropertySheetPageW(&psp);
psp.u.pszTemplate = MAKEINTRESOURCE(IDD_FONT); psp.u.pszTemplate = MAKEINTRESOURCEW(IDD_FONT);
psp.pfnDlgProc = WCUSER_FontDlgProc; psp.pfnDlgProc = WCUSER_FontDlgProc;
psPage[1] = CreatePropertySheetPage(&psp); psPage[1] = CreatePropertySheetPageW(&psp);
psp.u.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG); psp.u.pszTemplate = MAKEINTRESOURCEW(IDD_CONFIG);
psp.pfnDlgProc = WCUSER_ConfigDlgProc; psp.pfnDlgProc = WCUSER_ConfigDlgProc;
psPage[2] = CreatePropertySheetPage(&psp); psPage[2] = CreatePropertySheetPageW(&psp);
memset(&psHead, 0, sizeof(psHead)); memset(&psHead, 0, sizeof(psHead));
psHead.dwSize = sizeof(psHead); psHead.dwSize = sizeof(psHead);
if (!LoadString(GetModuleHandle(NULL), if (!LoadStringW(GetModuleHandleW(NULL),
(current) ? IDS_DLG_TIT_CURRENT : IDS_DLG_TIT_DEFAULT, (current) ? IDS_DLG_TIT_CURRENT : IDS_DLG_TIT_DEFAULT,
buff, sizeof(buff) / sizeof(buff[0]))) buff, sizeof(buff) / sizeof(buff[0])))
{ {
...@@ -832,7 +829,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) ...@@ -832,7 +829,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current)
WINECON_DumpConfig("init", refcfg); WINECON_DumpConfig("init", refcfg);
PropertySheet(&psHead); PropertySheetW(&psHead);
if (memcmp(refcfg, &di.config, sizeof(*refcfg)) == 0) if (memcmp(refcfg, &di.config, sizeof(*refcfg)) == 0)
return TRUE; return TRUE;
...@@ -841,7 +838,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) ...@@ -841,7 +838,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current)
WINECON_DumpConfig("cur", &di.config); WINECON_DumpConfig("cur", &di.config);
if (refcfg == &data->curcfg) if (refcfg == &data->curcfg)
{ {
switch (DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_SAVE_SETTINGS), switch (DialogBoxW(GetModuleHandleW(NULL), MAKEINTRESOURCEW(IDD_SAVE_SETTINGS),
data->hWnd, WCUSER_SaveDlgProc)) data->hWnd, WCUSER_SaveDlgProc))
{ {
case IDC_SAV_SAVE: save = TRUE; modify_session = TRUE; break; case IDC_SAV_SAVE: save = TRUE; modify_session = TRUE; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment