More Windows uiUninit() implementation.
This commit is contained in:
parent
04923399fe
commit
3f3191ea7a
|
@ -277,6 +277,14 @@ const char *initContainer(HICON hDefaultIcon, HCURSOR hDefaultCursor)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void uninitContainer(void)
|
||||
{
|
||||
if (DestroyWindow(initialParent) == 0)
|
||||
logLastError("error destroying initial parent in uninitContainer()");
|
||||
if (UnregisterClassW(containerClass, hInstance) == 0)
|
||||
logLastError("error unregistering uiContainer window class in uninitContainer()");
|
||||
}
|
||||
|
||||
// subclasses override this and call back here when all children are destroyed
|
||||
static void containerDestroy(uiControl *cc)
|
||||
{
|
||||
|
|
|
@ -109,9 +109,9 @@ void uiUninit(void)
|
|||
{
|
||||
uninitMenus();
|
||||
// TODO delete hollow brush
|
||||
// TODO uninit container
|
||||
uninitContainer();
|
||||
// TODO delete message font
|
||||
// TODO uninit window
|
||||
unregisterWindowClass();
|
||||
// TODO delete default cursor
|
||||
// TODO delete default icon
|
||||
uninitAlloc();
|
||||
|
|
|
@ -72,10 +72,12 @@ extern const char *initCommonControls(void);
|
|||
|
||||
// window.c
|
||||
extern ATOM registerWindowClass(HICON, HCURSOR);
|
||||
extern void unregisterWindowClass(void);
|
||||
|
||||
// container.c
|
||||
extern HWND initialParent;
|
||||
extern const char *initContainer(HICON, HCURSOR);
|
||||
extern void uninitContainer(void);
|
||||
|
||||
// menu.c
|
||||
extern HMENU makeMenubar(void);
|
||||
|
|
|
@ -71,6 +71,12 @@ ATOM registerWindowClass(HICON hDefaultIcon, HCURSOR hDefaultCursor)
|
|||
return RegisterClassW(&wc);
|
||||
}
|
||||
|
||||
void unregisterWindowClass(void)
|
||||
{
|
||||
if (UnregisterClassW(windowClass, hInstance) == 0)
|
||||
logLastError("error unregistering uiWindow window class in unregisterWindowClass()");
|
||||
}
|
||||
|
||||
static int defaultOnClosing(uiWindow *w, void *data)
|
||||
{
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue