ui/win32/window.c

changeset 666
86c3f109ed3b
parent 627
3f0c9fe60c68
child 813
6d9066951cdb
--- a/ui/win32/window.c	Tue Jul 15 12:09:51 2025 +0200
+++ b/ui/win32/window.c	Tue Jul 15 12:16:34 2025 +0200
@@ -39,7 +39,7 @@
 
 static HINSTANCE hInstance;
 
-static const wchar_t *mainWindowClass = L"UiMainWindow";
+static const char *mainWindowClass = "UiMainWindow";
 
 LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
     switch(uMsg) {
@@ -62,7 +62,7 @@
     wc.hCursor = LoadCursor(NULL, IDC_ARROW);
     wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
 
-    if(!RegisterClassEx(&wc)) {
+    if(!RegisterClassExA(&wc)) {
         MessageBox(NULL, "RegisterClassEx failed", "Error", MB_ICONERROR);
         exit(-1);
     }
@@ -72,10 +72,10 @@
     UiObject *obj = uic_object_new_toplevel();
     obj->window = window_data;
 	
-	HWND hwnd = CreateWindowEx(
+	HWND hwnd = CreateWindowExA(
 			0,
-			L"UiMainWindow",
-			"Test",
+			"UiMainWindow",
+			title,
 			WS_OVERLAPPEDWINDOW | WS_VISIBLE,
             CW_USEDEFAULT,
 			CW_USEDEFAULT,

mercurial