ui/win32/window.c

changeset 627
3f0c9fe60c68
parent 589
4d86050ad6ff
child 666
86c3f109ed3b
--- a/ui/win32/window.c	Mon Jun 16 21:21:00 2025 +0200
+++ b/ui/win32/window.c	Mon Jun 16 21:41:55 2025 +0200
@@ -29,6 +29,8 @@
 #include "window.h"
 #include "Windows.h"
 
+#include "../common/object.h"
+
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -67,10 +69,7 @@
 }
 
 static UiObject* create_window(const char *title, void *window_data, bool simple) {
-	CxMempool *mp = cxMempoolCreateSimple(256);
-    const CxAllocator *a = mp->allocator;
-    UiObject *obj = cxCalloc(a, 1, sizeof(UiObject));
-    obj->ctx = uic_context(obj, mp);
+    UiObject *obj = uic_object_new_toplevel();
     obj->window = window_data;
 	
 	HWND hwnd = CreateWindowEx(

mercurial