diff options
Diffstat (limited to 'src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp')
| -rw-r--r-- | src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp index ddb2d1c5..c1e8b2b3 100644 --- a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | |||
| @@ -3301,26 +3301,24 @@ private: | |||
| 3301 | HRESULT CreateMainWindow() | 3301 | HRESULT CreateMainWindow() |
| 3302 | { | 3302 | { |
| 3303 | HRESULT hr = S_OK; | 3303 | HRESULT hr = S_OK; |
| 3304 | WNDCLASSW wc = { }; | 3304 | WNDCLASSEXW wc = { sizeof(WNDCLASSEXW)}; |
| 3305 | DWORD dwWindowStyle = 0; | 3305 | DWORD dwWindowStyle = 0; |
| 3306 | int x = CW_USEDEFAULT; | 3306 | int x = CW_USEDEFAULT; |
| 3307 | int y = CW_USEDEFAULT; | 3307 | int y = CW_USEDEFAULT; |
| 3308 | POINT ptCursor = { }; | 3308 | POINT ptCursor = { }; |
| 3309 | 3309 | ||
| 3310 | ThemeInitializeWindowClass(m_pTheme, &wc, CWixStandardBootstrapperApplication::WndProc, m_hModule, WIXSTDBA_WINDOW_CLASS); | 3310 | ThemeInitializeWindowClassEx(m_pTheme, &wc, CWixStandardBootstrapperApplication::WndProc, m_hModule, WIXSTDBA_WINDOW_CLASS); |
| 3311 | 3311 | ||
| 3312 | // If the theme did not provide an icon, try using the icon from the bundle engine. | 3312 | // If the theme did not provide an icon, try using the icon from the bundle then fallback to the bundle engine. |
| 3313 | if (!wc.hIcon) | 3313 | if (!wc.hIcon) |
| 3314 | { | 3314 | { |
| 3315 | HMODULE hBootstrapperEngine = ::GetModuleHandleW(NULL); | 3315 | LoadBundleIcon(m_hModule, &m_hIcon, &m_hSmallIcon); |
| 3316 | if (hBootstrapperEngine) | 3316 | wc.hIcon = m_hIcon; |
| 3317 | { | 3317 | wc.hIconSm = m_hSmallIcon; |
| 3318 | wc.hIcon = ::LoadIconW(hBootstrapperEngine, MAKEINTRESOURCEW(1)); | ||
| 3319 | } | ||
| 3320 | } | 3318 | } |
| 3321 | 3319 | ||
| 3322 | // Register the window class and create the window. | 3320 | // Register the window class and create the window. |
| 3323 | if (!::RegisterClassW(&wc)) | 3321 | if (!::RegisterClassExW(&wc)) |
| 3324 | { | 3322 | { |
| 3325 | ExitWithLastError(hr, "Failed to register window."); | 3323 | ExitWithLastError(hr, "Failed to register window."); |
| 3326 | } | 3324 | } |
| @@ -3358,7 +3356,6 @@ private: | |||
| 3358 | return hr; | 3356 | return hr; |
| 3359 | } | 3357 | } |
| 3360 | 3358 | ||
| 3361 | |||
| 3362 | // | 3359 | // |
| 3363 | // InitializeTaskbarButton - initializes taskbar button for progress. | 3360 | // InitializeTaskbarButton - initializes taskbar button for progress. |
| 3364 | // | 3361 | // |
| @@ -3397,6 +3394,18 @@ private: | |||
| 3397 | ::UnregisterClassW(WIXSTDBA_WINDOW_CLASS, m_hModule); | 3394 | ::UnregisterClassW(WIXSTDBA_WINDOW_CLASS, m_hModule); |
| 3398 | m_fRegistered = FALSE; | 3395 | m_fRegistered = FALSE; |
| 3399 | } | 3396 | } |
| 3397 | |||
| 3398 | if (m_hIcon) | ||
| 3399 | { | ||
| 3400 | ::DestroyIcon(m_hIcon); | ||
| 3401 | m_hIcon = NULL; | ||
| 3402 | } | ||
| 3403 | |||
| 3404 | if (m_hSmallIcon) | ||
| 3405 | { | ||
| 3406 | ::DestroyIcon(m_hSmallIcon); | ||
| 3407 | m_hSmallIcon = NULL; | ||
| 3408 | } | ||
| 3400 | } | 3409 | } |
| 3401 | 3410 | ||
| 3402 | 3411 | ||
| @@ -4822,6 +4831,8 @@ public: | |||
| 4822 | m_pTheme = NULL; | 4831 | m_pTheme = NULL; |
| 4823 | memset(m_rgdwPageIds, 0, sizeof(m_rgdwPageIds)); | 4832 | memset(m_rgdwPageIds, 0, sizeof(m_rgdwPageIds)); |
| 4824 | m_hUiThread = NULL; | 4833 | m_hUiThread = NULL; |
| 4834 | m_hIcon = NULL; | ||
| 4835 | m_hSmallIcon = NULL; | ||
| 4825 | m_fRegistered = FALSE; | 4836 | m_fRegistered = FALSE; |
| 4826 | m_hWnd = NULL; | 4837 | m_hWnd = NULL; |
| 4827 | 4838 | ||
| @@ -5110,6 +5121,8 @@ private: | |||
| 5110 | THEME_ASSIGN_CONTROL_ID m_rgInitControls[LAST_WIXSTDBA_CONTROL - WIXSTDBA_FIRST_ASSIGN_CONTROL_ID]; | 5121 | THEME_ASSIGN_CONTROL_ID m_rgInitControls[LAST_WIXSTDBA_CONTROL - WIXSTDBA_FIRST_ASSIGN_CONTROL_ID]; |
| 5111 | DWORD m_rgdwPageIds[countof(vrgwzPageNames)]; | 5122 | DWORD m_rgdwPageIds[countof(vrgwzPageNames)]; |
| 5112 | HANDLE m_hUiThread; | 5123 | HANDLE m_hUiThread; |
| 5124 | HICON m_hIcon; | ||
| 5125 | HICON m_hSmallIcon; | ||
| 5113 | BOOL m_fRegistered; | 5126 | BOOL m_fRegistered; |
| 5114 | HWND m_hWnd; | 5127 | HWND m_hWnd; |
| 5115 | 5128 | ||
