Hooked everything else together (initialParent, ui_windows.h in uipriv_windows.h). Now to fix build issues... (like a missing const in const char * fixed here too).

This commit is contained in:
Pietro Gagliardi 2015-04-07 03:02:07 -04:00
parent 300c86b590
commit 54259ed98b
2 changed files with 9 additions and 1 deletions

View File

@ -6,12 +6,14 @@ int nCmdShow;
HFONT hMessageFont;
HWND initialParent;
struct uiInitError {
char *msg;
char failbuf[256];
};
static void loadLastError(uiInitError *err, char *message)
static void loadLastError(uiInitError *err, const char *message)
{
DWORD le;
@ -79,6 +81,11 @@ uiInitError *uiInit(uiInitOptions *o)
return err;
}
// 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 = uiWindowHandle(uiNewWindow("", 0, 0));
uiFree(err);
return NULL;
}

View File

@ -27,6 +27,7 @@
#include <oleacc.h>
#include <stdio.h>
#include "uipriv.h"
#include "ui_windows.h"
// ui internal window messages
enum {