More TODO resolution in windows/init.c.

This commit is contained in:
Pietro Gagliardi 2015-06-02 14:12:12 -04:00
parent b793692199
commit b3adda2287
3 changed files with 12 additions and 5 deletions

View File

@ -92,6 +92,12 @@ ATOM initDialogHelper(HICON hDefaultIcon, HCURSOR hDefaultCursor)
return RegisterClassW(&wc);
}
void uninitDialogHelper(void)
{
if (UnregisterClassW(dialogHelperClass, hInstance) == 0)
logLastError("error unregistering dialog helper window class in uninitDialogHelper()");
}
HWND beginDialogHelper(void)
{
HWND hwnd;

View File

@ -166,16 +166,16 @@ void uiUninit(void)
{
uninitMenus();
CoUninitialize();
// TODO uninitialize the dialog helper
// TODO delete hollow brush
uninitDialogHelper();
if (DeleteObject(hollowBrush) == 0)
logLastError("error freeing hollow brush in uiUninit()");
if (SetConsoleCtrlHandler(consoleCtrlHandler, FALSE) == 0)
logLastError("error unregistering console end session handler");
logLastError("error unregistering console end session handler in uiUninit()");
uninitContainer();
if (DeleteObject(hMessageFont) == 0)
logLastError("error deleting control font in uiUninit()");
unregisterWindowClass();
// TODO delete default cursor
// TODO delete default icon
// no need to delete the default icon or cursor; see http://stackoverflow.com/questions/30603077/
uninitResizes();
uninitTypes();
uninitAlloc();

View File

@ -108,6 +108,7 @@ extern BOOL runWM_HSCROLL(WPARAM, LPARAM, LRESULT *);
extern void dialogHelperRegisterWindow(HWND);
extern void dialogHelperUnregisterWindow(HWND);
extern ATOM initDialogHelper(HICON, HCURSOR);
extern void uninitDialogHelper(void);
extern HWND beginDialogHelper(void);
extern void endDialogHelper(HWND);