ui/win32/window.c

changeset 816
f5690594b240
parent 815
7ddf5fb7ec2a
child 818
8185cd761897
equal deleted inserted replaced
815:7ddf5fb7ec2a 816:f5690594b240
73 WNDCLASSEX wc = { sizeof(WNDCLASSEX) }; 73 WNDCLASSEX wc = { sizeof(WNDCLASSEX) };
74 wc.lpfnWndProc = WindowProc; 74 wc.lpfnWndProc = WindowProc;
75 wc.hInstance = hInstance; 75 wc.hInstance = hInstance;
76 wc.lpszClassName = mainWindowClass; 76 wc.lpszClassName = mainWindowClass;
77 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 77 wc.hCursor = LoadCursor(NULL, IDC_ARROW);
78 wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); 78 wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
79 79
80 if(!RegisterClassExA(&wc)) { 80 if(!RegisterClassExA(&wc)) {
81 MessageBox(NULL, "RegisterClassEx failed", "Error", MB_ICONERROR); 81 MessageBox(NULL, "RegisterClassEx failed", "Error", MB_ICONERROR);
82 exit(-1); 82 exit(-1);
83 } 83 }
84 } 84 }
85 85
86 static UiObject* create_window(const char *title, void *window_data, bool simple) { 86 static UiObject* create_window(const char *title, void *window_data, bool simple) {
87 UiObject *obj = uic_object_new_toplevel(); 87 UiObject *obj = uic_object_new_toplevel();
88 obj->window = window_data; 88 obj->window = window_data;
89 89
90 HWND hwnd = CreateWindowExA( 90 HWND hwnd = CreateWindowExA(
91 0, 91 0,
92 "UiMainWindow", 92 "UiMainWindow",
93 title, 93 title,
94 WS_OVERLAPPEDWINDOW, 94 WS_OVERLAPPEDWINDOW,

mercurial