ui/win32/window.c

changeset 627
3f0c9fe60c68
parent 589
4d86050ad6ff
child 666
86c3f109ed3b
equal deleted inserted replaced
626:724c7036a03e 627:3f0c9fe60c68
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "window.h" 29 #include "window.h"
30 #include "Windows.h" 30 #include "Windows.h"
31
32 #include "../common/object.h"
31 33
32 34
33 #include <stdbool.h> 35 #include <stdbool.h>
34 #include <stdio.h> 36 #include <stdio.h>
35 #include <stdlib.h> 37 #include <stdlib.h>
65 exit(-1); 67 exit(-1);
66 } 68 }
67 } 69 }
68 70
69 static UiObject* create_window(const char *title, void *window_data, bool simple) { 71 static UiObject* create_window(const char *title, void *window_data, bool simple) {
70 CxMempool *mp = cxMempoolCreateSimple(256); 72 UiObject *obj = uic_object_new_toplevel();
71 const CxAllocator *a = mp->allocator;
72 UiObject *obj = cxCalloc(a, 1, sizeof(UiObject));
73 obj->ctx = uic_context(obj, mp);
74 obj->window = window_data; 73 obj->window = window_data;
75 74
76 HWND hwnd = CreateWindowEx( 75 HWND hwnd = CreateWindowEx(
77 0, 76 0,
78 L"UiMainWindow", 77 L"UiMainWindow",

mercurial