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); return RegisterClassW(&wc);
} }
void uninitDialogHelper(void)
{
if (UnregisterClassW(dialogHelperClass, hInstance) == 0)
logLastError("error unregistering dialog helper window class in uninitDialogHelper()");
}
HWND beginDialogHelper(void) HWND beginDialogHelper(void)
{ {
HWND hwnd; HWND hwnd;

View File

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

View File

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