summaryrefslogtreecommitdiff
path: root/new/init_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-10 19:56:23 -0400
committerPietro Gagliardi <[email protected]>2015-04-10 19:56:23 -0400
commit94b621855c2e56df3b34f47a4c4bb4afcb14e53d (patch)
treef58732c3e553540869933203f2230ea87d37f599 /new/init_windows.c
parentbd0594821918aa91c7c59cf5cdbc54bc41273a6e (diff)
Added REAL code for the initial parent of a control on Windows.
Diffstat (limited to 'new/init_windows.c')
-rw-r--r--new/init_windows.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/new/init_windows.c b/new/init_windows.c
index d525b94..2b24e0a 100644
--- a/new/init_windows.c
+++ b/new/init_windows.c
@@ -6,8 +6,6 @@ int nCmdShow;
HFONT hMessageFont;
-HWND initialParent;
-
struct uiInitError {
char *msg;
char failbuf[256];
@@ -95,10 +93,9 @@ const char *uiInit(uiInitOptions *o)
if (hMessageFont == NULL)
return loadLastError("loading default messagebox font; this is the default UI font");
- // give each control a reasonable initial parent
- // don't free the initial parent!
- // TODO tune this better; it shouldn't be closed, for instance
- initialParent = (HWND) uiWindowHandle(uiNewWindow("", 0, 0));
+ ce = initInitialParent(hDefaultIcon, hDefaultCursor);
+ if (ce != NULL)
+ return loadLastError(ce);
return NULL;
}