Commit 39669fa8 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Use SetDlgItemText instead of sending a WM_SETTEXT.

parent ec2f9615
...@@ -951,17 +951,16 @@ static void PRINTDLG_UpdatePrinterInfoTextsA(HWND hDlg, LPPRINTER_INFO_2A pi) ...@@ -951,17 +951,16 @@ static void PRINTDLG_UpdatePrinterInfoTextsA(HWND hDlg, LPPRINTER_INFO_2A pi)
LoadStringA(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY, LoadStringA(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY,
ResourceString, 255); ResourceString, 255);
strcat(StatusMsg,ResourceString); strcat(StatusMsg,ResourceString);
SetDlgItemTextA(hDlg, stc12, StatusMsg);
SendDlgItemMessageA(hDlg, stc12, WM_SETTEXT, 0, (LPARAM)StatusMsg);
/* set all other printer info texts */ /* set all other printer info texts */
SendDlgItemMessageA(hDlg, stc11, WM_SETTEXT, 0, (LPARAM)pi->pDriverName); SetDlgItemTextA(hDlg, stc11, pi->pDriverName);
if (pi->pLocation != NULL && pi->pLocation[0] != '\0') if (pi->pLocation != NULL && pi->pLocation[0] != '\0')
SendDlgItemMessageA(hDlg, stc14, WM_SETTEXT, 0,(LPARAM)pi->pLocation); SetDlgItemTextA(hDlg, stc14, pi->pLocation);
else else
SendDlgItemMessageA(hDlg, stc14, WM_SETTEXT, 0,(LPARAM)pi->pPortName); SetDlgItemTextA(hDlg, stc14, pi->pPortName);
SendDlgItemMessageA(hDlg, stc13, WM_SETTEXT, 0, (LPARAM)(pi->pComment ? SetDlgItemTextA(hDlg, stc13, pi->pComment ? pi->pComment : "");
pi->pComment : ""));
return; return;
} }
...@@ -969,6 +968,7 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, LPPRINTER_INFO_2W pi) ...@@ -969,6 +968,7 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, LPPRINTER_INFO_2W pi)
{ {
WCHAR StatusMsg[256]; WCHAR StatusMsg[256];
WCHAR ResourceString[256]; WCHAR ResourceString[256];
static const WCHAR emptyW[] = {0};
int i; int i;
/* Status Message */ /* Status Message */
...@@ -988,18 +988,15 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, LPPRINTER_INFO_2W pi) ...@@ -988,18 +988,15 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, LPPRINTER_INFO_2W pi)
LoadStringW(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY, LoadStringW(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY,
ResourceString, 255); ResourceString, 255);
lstrcatW(StatusMsg,ResourceString); lstrcatW(StatusMsg,ResourceString);
SetDlgItemTextW(hDlg, stc12, StatusMsg);
SendDlgItemMessageW(hDlg, stc12, WM_SETTEXT, 0, (LPARAM)StatusMsg);
/* set all other printer info texts */ /* set all other printer info texts */
SendDlgItemMessageW(hDlg, stc11, WM_SETTEXT, 0, (LPARAM)pi->pDriverName); SetDlgItemTextW(hDlg, stc11, pi->pDriverName);
if (pi->pLocation != NULL && pi->pLocation[0] != '\0') if (pi->pLocation != NULL && pi->pLocation[0] != '\0')
SendDlgItemMessageW(hDlg, stc14, WM_SETTEXT, 0,(LPARAM)pi->pLocation); SetDlgItemTextW(hDlg, stc14, pi->pLocation);
else else
SendDlgItemMessageW(hDlg, stc14, WM_SETTEXT, 0,(LPARAM)pi->pPortName); SetDlgItemTextW(hDlg, stc14, pi->pPortName);
SendDlgItemMessageW(hDlg, stc13, WM_SETTEXT, 0, (LPARAM)(pi->pComment ? SetDlgItemTextW(hDlg, stc13, pi->pComment ? pi->pComment : emptyW);
pi->pComment : (LPCWSTR)"\0\0"));
return;
} }
......
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