From dce1c97c7d3e76c18e4f80d4ffe288d2933a74bc Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 27 Oct 2021 15:29:19 -0500 Subject: Make thmutil automatically load controls during window creation. Add control loaded event. --- src/samples/thmviewer/thmviewer.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/samples/thmviewer/thmviewer.cpp') diff --git a/src/samples/thmviewer/thmviewer.cpp b/src/samples/thmviewer/thmviewer.cpp index e593d6ad..1d941323 100644 --- a/src/samples/thmviewer/thmviewer.cpp +++ b/src/samples/thmviewer/thmviewer.cpp @@ -353,16 +353,7 @@ static LRESULT CALLBACK MainWndProc( case WM_NCDESTROY: DecrementHandleTheme(pHandleTheme); ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0); - break; - - case WM_CREATE: - { - HRESULT hr = ThemeLoadControls(vpTheme); - if (FAILED(hr)) - { - return -1; - } - } + ::PostQuitMessage(0); break; case WM_THMVWR_THEME_LOAD_BEGIN: @@ -377,10 +368,6 @@ static LRESULT CALLBACK MainWndProc( OnNewTheme(vpTheme, hWnd, reinterpret_cast(lParam)); return 0; - case WM_DESTROY: - ::PostQuitMessage(0); - break; - case WM_THMUTIL_LOADING_CONTROL: return OnThemeLoadingControl(reinterpret_cast(wParam), reinterpret_cast(lParam)); -- cgit v1.2.3-55-g6feb