[PATCH] clock: Use wide-char string literals.
Michael Stefaniuc
mstefani at winehq.org
Mon Oct 5 16:22:48 CDT 2020
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
programs/clock/main.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/programs/clock/main.c b/programs/clock/main.c
index 3ad636be431..43364745ea5 100644
--- a/programs/clock/main.c
+++ b/programs/clock/main.c
@@ -104,10 +104,9 @@ static BOOL CLOCK_ResetTimer(void)
period = 1000;
if (!SetTimer (Globals.hMainWnd, TIMER_ID, period, NULL)) {
- static const WCHAR notimersW[] = {'N','o',' ','a','v','a','i','l','a','b','l','e',' ','t','i','m','e','r','s',0};
WCHAR szApp[MAX_STRING_LEN];
LoadStringW(Globals.hInstance, IDS_CLOCK, szApp, MAX_STRING_LEN);
- MessageBoxW(0, notimersW, szApp, MB_ICONEXCLAMATION | MB_OK);
+ MessageBoxW(0, L"No available timers", szApp, MB_ICONEXCLAMATION | MB_OK);
return FALSE;
}
return TRUE;
@@ -390,9 +389,6 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show
MSG msg;
WNDCLASSW class;
- static const WCHAR szClassName[] = {'C','L','C','l','a','s','s',0};
- static const WCHAR szWinName[] = {'C','l','o','c','k',0};
-
/* Setup Globals */
memset(&Globals.hFont, 0, sizeof (Globals.hFont));
Globals.bAnalog = TRUE;
@@ -408,13 +404,13 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show
class.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW);
class.hbrBackground = 0;
class.lpszMenuName = 0;
- class.lpszClassName = szClassName;
+ class.lpszClassName = L"CLClass";
}
-
+
if (!RegisterClassW(&class)) return FALSE;
-
+
Globals.MaxX = Globals.MaxY = INITIAL_WINDOW_SIZE;
- Globals.hMainWnd = CreateWindowW(szClassName, szWinName, WS_OVERLAPPEDWINDOW,
+ Globals.hMainWnd = CreateWindowW(L"CLClass", L"Clock", WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT,
Globals.MaxX, Globals.MaxY, 0,
0, hInstance, 0);
--
2.26.2
More information about the wine-devel
mailing list