Commit 4fd668d0 authored by Alexandre Julliard's avatar Alexandre Julliard

Replace some instances of LoadStringA by LoadStringW.

parent 28d29300
...@@ -308,15 +308,12 @@ static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg, ...@@ -308,15 +308,12 @@ static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg,
nToPage = GetDlgItemInt(hDlg, edt2, NULL, FALSE); nToPage = GetDlgItemInt(hDlg, edt2, NULL, FALSE);
if (nFromPage < lppd->nMinPage || nFromPage > lppd->nMaxPage || if (nFromPage < lppd->nMinPage || nFromPage > lppd->nMaxPage ||
nToPage < lppd->nMinPage || nToPage > lppd->nMaxPage) { nToPage < lppd->nMinPage || nToPage > lppd->nMaxPage) {
char resourcestr[256]; WCHAR resourcestr[256];
char resultstr[256]; WCHAR resultstr[256];
LoadStringA(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE, LoadStringW(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE, resourcestr, 255);
resourcestr, 255); wsprintfW(resultstr,resourcestr, lppd->nMinPage, lppd->nMaxPage);
sprintf(resultstr,resourcestr, lppd->nMinPage, lppd->nMaxPage); LoadStringW(COMDLG32_hInstance, PD32_PRINT_TITLE, resourcestr, 255);
LoadStringA(COMDLG32_hInstance, PD32_PRINT_TITLE, MessageBoxW(hDlg, resultstr, resourcestr, MB_OK | MB_ICONWARNING);
resourcestr, 255);
MessageBoxA(hDlg, resultstr, resourcestr,
MB_OK | MB_ICONWARNING);
return FALSE; return FALSE;
} }
lppd->nFromPage = nFromPage; lppd->nFromPage = nFromPage;
...@@ -3569,9 +3566,9 @@ BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA setupdlg) { ...@@ -3569,9 +3566,9 @@ BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA setupdlg) {
bRet = PrintDlgA(&pdlg); bRet = PrintDlgA(&pdlg);
if (!bRet){ if (!bRet){
if (!(setupdlg->Flags & PSD_NOWARNING)) { if (!(setupdlg->Flags & PSD_NOWARNING)) {
char errstr[256]; WCHAR errstr[256];
LoadStringA(COMDLG32_hInstance, PD32_NO_DEFAULT_PRINTER, errstr, 255); LoadStringW(COMDLG32_hInstance, PD32_NO_DEFAULT_PRINTER, errstr, 255);
MessageBoxA(setupdlg->hwndOwner, errstr, 0, MB_OK | MB_ICONERROR); MessageBoxW(setupdlg->hwndOwner, errstr, 0, MB_OK | MB_ICONERROR);
} }
return FALSE; return FALSE;
} }
......
...@@ -305,7 +305,7 @@ static void UIINSERTOBJECTDLG_SelectCreateNew(InsertObjectDlgInfo* pdlgInfo) ...@@ -305,7 +305,7 @@ static void UIINSERTOBJECTDLG_SelectCreateNew(InsertObjectDlgInfo* pdlgInfo)
*/ */
static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo) static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo)
{ {
char resstr[MAX_PATH]; WCHAR resstr[MAX_PATH];
ShowWindow(pdlgInfo->hwndAddCtrlBTN, SW_HIDE); ShowWindow(pdlgInfo->hwndAddCtrlBTN, SW_HIDE);
ShowWindow(pdlgInfo->hwndObjTypeLBL, SW_HIDE); ShowWindow(pdlgInfo->hwndObjTypeLBL, SW_HIDE);
...@@ -318,10 +318,10 @@ static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo ...@@ -318,10 +318,10 @@ static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo
ShowWindow(pdlgInfo->hwndFileTB, SW_SHOW); ShowWindow(pdlgInfo->hwndFileTB, SW_SHOW);
ShowWindow(pdlgInfo->hwndBrowseBTN, SW_SHOW); ShowWindow(pdlgInfo->hwndBrowseBTN, SW_SHOW);
SendMessageA(pdlgInfo->hwndCreateFromFileCB, BM_SETCHECK, BST_CHECKED, 0); SendMessageW(pdlgInfo->hwndCreateFromFileCB, BM_SETCHECK, BST_CHECKED, 0);
if (LoadStringA(OLEDLG_hInstance, IDS_RESULTFILEOBJDESC, resstr, MAX_PATH)) if (LoadStringW(OLEDLG_hInstance, IDS_RESULTFILEOBJDESC, resstr, MAX_PATH))
SendMessageA(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)resstr); SendMessageW(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)resstr);
} }
...@@ -418,20 +418,20 @@ static void UIINSERTOBJECTDLG_FreeObjectTypes(InsertObjectDlgInfo* pdlgInfo) ...@@ -418,20 +418,20 @@ static void UIINSERTOBJECTDLG_FreeObjectTypes(InsertObjectDlgInfo* pdlgInfo)
static void UIINSERTOBJECTDLG_SelChange(InsertObjectDlgInfo* pdlgInfo) static void UIINSERTOBJECTDLG_SelChange(InsertObjectDlgInfo* pdlgInfo)
{ {
INT index; INT index;
CHAR objname[MAX_PATH]; WCHAR objname[MAX_PATH];
CHAR objdesc[MAX_PATH]; WCHAR objdesc[MAX_PATH];
CHAR resstr[MAX_PATH]; WCHAR resstr[MAX_PATH];
TRACE("\n"); TRACE("\n");
if (LoadStringA(OLEDLG_hInstance, IDS_RESULTOBJDESC, resstr, MAX_PATH) && if (LoadStringW(OLEDLG_hInstance, IDS_RESULTOBJDESC, resstr, MAX_PATH) &&
((index = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETCURSEL, 0, 0)) >= 0) && ((index = SendMessageW(pdlgInfo->hwndObjTypeLB, LB_GETCURSEL, 0, 0)) >= 0) &&
SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETTEXT, (WPARAM)index, (LPARAM)objname)) SendMessageW(pdlgInfo->hwndObjTypeLB, LB_GETTEXT, (WPARAM)index, (LPARAM)objname))
sprintf(objdesc, resstr, objname); wsprintfW(objdesc, resstr, objname);
else else
objdesc[0] = 0; objdesc[0] = 0;
SendMessageA(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)objdesc); SendMessageW(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)objdesc);
} }
...@@ -615,13 +615,13 @@ static void UIINSERTOBJECTDLG_AddControl(InsertObjectDlgInfo* pdlgInfo) ...@@ -615,13 +615,13 @@ static void UIINSERTOBJECTDLG_AddControl(InsertObjectDlgInfo* pdlgInfo)
if (!bValid) if (!bValid)
{ {
char title[32]; WCHAR title[32];
char msg[256]; WCHAR msg[256];
LoadStringA(OLEDLG_hInstance, IDS_NOTOLEMODCAPTION, title, 32); LoadStringW(OLEDLG_hInstance, IDS_NOTOLEMODCAPTION, title, 32);
LoadStringA(OLEDLG_hInstance, IDS_NOTOLEMOD, msg, 256); LoadStringW(OLEDLG_hInstance, IDS_NOTOLEMOD, msg, 256);
MessageBoxA(pdlgInfo->hwndSelf, msg, title, MB_ICONEXCLAMATION); MessageBoxW(pdlgInfo->hwndSelf, msg, title, MB_ICONEXCLAMATION);
} }
} }
} }
...@@ -608,14 +608,13 @@ BOOL DoScannerUI(void) ...@@ -608,14 +608,13 @@ BOOL DoScannerUI(void)
static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt, static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt,
int index, int position) int index, int position)
{ {
CHAR buffer[244]; WCHAR buffer[244];
HWND edit_w; HWND edit_w;
CHAR unit[20]; int len;
LoadStringA(SANE_instance, opt->unit, unit,20);
if (opt->type == SANE_TYPE_INT) if (opt->type == SANE_TYPE_INT)
{ {
static const WCHAR formatW[] = {'%','i',0};
INT si; INT si;
if (opt->constraint.range->quant) if (opt->constraint.range->quant)
...@@ -623,11 +622,11 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt, ...@@ -623,11 +622,11 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt,
else else
si = position; si = position;
sprintf(buffer,"%i %s",si,unit); len = wsprintfW( buffer, formatW, si );
} }
else if (opt->type == SANE_TYPE_FIXED) else if (opt->type == SANE_TYPE_FIXED)
{ {
static const WCHAR formatW[] = {'%','f',0};
double s_quant, dd; double s_quant, dd;
s_quant = SANE_UNFIX(opt->constraint.range->quant); s_quant = SANE_UNFIX(opt->constraint.range->quant);
...@@ -637,14 +636,15 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt, ...@@ -637,14 +636,15 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt,
else else
dd = position * 0.01; dd = position * 0.01;
sprintf(buffer,"%f %s",dd,unit); len = wsprintfW( buffer, formatW, dd );
} }
else else return;
buffer[0] = 0;
buffer[len++] = ' ';
LoadStringW( SANE_instance, opt->unit, buffer + len, sizeof(buffer)/sizeof(WCHAR) - len );
edit_w = GetDlgItem(hwnd,index+ID_BASE+ID_EDIT_BASE); edit_w = GetDlgItem(hwnd,index+ID_BASE+ID_EDIT_BASE);
if (edit_w && buffer[0]) if (edit_w) SetWindowTextW(edit_w,buffer);
SetWindowTextA(edit_w,buffer);
} }
......
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