diff options
-rw-r--r-- | src/api/burn/balutil/inc/BAFunctions.h | 7 | ||||
-rw-r--r-- | src/api/burn/balutil/inc/BalBaseBAFunctions.h | 30 | ||||
-rw-r--r-- | src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | 4 | ||||
-rw-r--r-- | src/api/burn/balutil/inc/IBAFunctions.h | 8 | ||||
-rw-r--r-- | src/api/burn/test/BalUtilUnitTest/precomp.h | 2 | ||||
-rw-r--r-- | src/ext/Bal/Samples/bafunctions/precomp.h | 4 | ||||
-rw-r--r-- | src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp | 20 | ||||
-rw-r--r-- | src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp | 12 |
8 files changed, 40 insertions, 47 deletions
diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h index 0eda95a1..149a12f8 100644 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ b/src/api/burn/balutil/inc/BAFunctions.h | |||
@@ -178,8 +178,7 @@ struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS | |||
178 | struct BA_FUNCTIONS_ONTHEMELOADED_ARGS | 178 | struct BA_FUNCTIONS_ONTHEMELOADED_ARGS |
179 | { | 179 | { |
180 | DWORD cbSize; | 180 | DWORD cbSize; |
181 | THEME* pTheme; | 181 | HWND hWnd; |
182 | WIX_LOCALIZATION* pWixLoc; | ||
183 | }; | 182 | }; |
184 | 183 | ||
185 | struct BA_FUNCTIONS_ONTHEMELOADED_RESULTS | 184 | struct BA_FUNCTIONS_ONTHEMELOADED_RESULTS |
@@ -190,7 +189,6 @@ struct BA_FUNCTIONS_ONTHEMELOADED_RESULTS | |||
190 | struct BA_FUNCTIONS_WNDPROC_ARGS | 189 | struct BA_FUNCTIONS_WNDPROC_ARGS |
191 | { | 190 | { |
192 | DWORD cbSize; | 191 | DWORD cbSize; |
193 | THEME* pTheme; | ||
194 | HWND hWnd; | 192 | HWND hWnd; |
195 | UINT uMsg; | 193 | UINT uMsg; |
196 | WPARAM wParam; | 194 | WPARAM wParam; |
@@ -200,7 +198,8 @@ struct BA_FUNCTIONS_WNDPROC_ARGS | |||
200 | struct BA_FUNCTIONS_WNDPROC_RESULTS | 198 | struct BA_FUNCTIONS_WNDPROC_RESULTS |
201 | { | 199 | { |
202 | DWORD cbSize; | 200 | DWORD cbSize; |
203 | LRESULT lres; | 201 | BOOL fProcessed; |
202 | LRESULT lResult; | ||
204 | }; | 203 | }; |
205 | 204 | ||
206 | typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_CREATE)( | 205 | typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_CREATE)( |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h index d97df350..1493253b 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h | |||
@@ -5,9 +5,6 @@ | |||
5 | #include <windows.h> | 5 | #include <windows.h> |
6 | #include <msiquery.h> | 6 | #include <msiquery.h> |
7 | 7 | ||
8 | #include "dutil.h" | ||
9 | #include "locutil.h" | ||
10 | #include "thmutil.h" | ||
11 | #include "BAFunctions.h" | 8 | #include "BAFunctions.h" |
12 | #include "IBAFunctions.h" | 9 | #include "IBAFunctions.h" |
13 | #include "BootstrapperEngine.h" | 10 | #include "BootstrapperEngine.h" |
@@ -803,32 +800,26 @@ public: // IBAFunctions | |||
803 | } | 800 | } |
804 | 801 | ||
805 | virtual STDMETHODIMP OnThemeLoaded( | 802 | virtual STDMETHODIMP OnThemeLoaded( |
806 | THEME* pTheme, | 803 | __in HWND hWnd |
807 | WIX_LOCALIZATION* pWixLoc | ||
808 | ) | 804 | ) |
809 | { | 805 | { |
810 | HRESULT hr = S_OK; | 806 | HRESULT hr = S_OK; |
811 | 807 | ||
812 | m_pTheme = pTheme; | 808 | m_hwndParent = hWnd; |
813 | m_pWixLoc = pWixLoc; | ||
814 | 809 | ||
815 | return hr; | 810 | return hr; |
816 | } | 811 | } |
817 | 812 | ||
818 | virtual STDMETHODIMP WndProc( | 813 | virtual STDMETHODIMP WndProc( |
819 | __in THEME* pTheme, | 814 | __in HWND /*hWnd*/, |
820 | __in HWND hWnd, | 815 | __in UINT /*uMsg*/, |
821 | __in UINT uMsg, | 816 | __in WPARAM /*wParam*/, |
822 | __in WPARAM wParam, | 817 | __in LPARAM /*lParam*/, |
823 | __in LPARAM lParam, | 818 | __inout BOOL* /*pfProcessed*/, |
824 | __inout LRESULT* plRes | 819 | __inout LRESULT* /*plResult*/ |
825 | ) | 820 | ) |
826 | { | 821 | { |
827 | HRESULT hr = S_OK; | 822 | return S_OK; |
828 | |||
829 | *plRes = ThemeDefWindowProc(pTheme, hWnd, uMsg, wParam, lParam); | ||
830 | |||
831 | return hr; | ||
832 | } | 823 | } |
833 | 824 | ||
834 | virtual STDMETHODIMP BAFunctionsProc( | 825 | virtual STDMETHODIMP BAFunctionsProc( |
@@ -917,6 +908,5 @@ protected: | |||
917 | BA_FUNCTIONS_CREATE_ARGS m_bafCreateArgs; | 908 | BA_FUNCTIONS_CREATE_ARGS m_bafCreateArgs; |
918 | BOOTSTRAPPER_CREATE_ARGS m_baCreateArgs; | 909 | BOOTSTRAPPER_CREATE_ARGS m_baCreateArgs; |
919 | BOOTSTRAPPER_COMMAND m_command; | 910 | BOOTSTRAPPER_COMMAND m_command; |
920 | THEME* m_pTheme; | 911 | HWND m_hwndParent; |
921 | WIX_LOCALIZATION* m_pWixLoc; | ||
922 | }; | 912 | }; |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h index 2af231e8..135f7c76 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | |||
@@ -12,7 +12,7 @@ static HRESULT BalBaseBAFunctionsProcOnThemeLoaded( | |||
12 | __inout BA_FUNCTIONS_ONTHEMELOADED_RESULTS* /*pResults*/ | 12 | __inout BA_FUNCTIONS_ONTHEMELOADED_RESULTS* /*pResults*/ |
13 | ) | 13 | ) |
14 | { | 14 | { |
15 | return pBAFunctions->OnThemeLoaded(pArgs->pTheme, pArgs->pWixLoc); | 15 | return pBAFunctions->OnThemeLoaded(pArgs->hWnd); |
16 | } | 16 | } |
17 | 17 | ||
18 | static HRESULT BalBaseBAFunctionsProcWndProc( | 18 | static HRESULT BalBaseBAFunctionsProcWndProc( |
@@ -21,7 +21,7 @@ static HRESULT BalBaseBAFunctionsProcWndProc( | |||
21 | __inout BA_FUNCTIONS_WNDPROC_RESULTS* pResults | 21 | __inout BA_FUNCTIONS_WNDPROC_RESULTS* pResults |
22 | ) | 22 | ) |
23 | { | 23 | { |
24 | return pBAFunctions->WndProc(pArgs->pTheme, pArgs->hWnd, pArgs->uMsg, pArgs->wParam, pArgs->lParam, &pResults->lres); | 24 | return pBAFunctions->WndProc(pArgs->hWnd, pArgs->uMsg, pArgs->wParam, pArgs->lParam, &pResults->fProcessed, &pResults->lResult); |
25 | } | 25 | } |
26 | 26 | ||
27 | static HRESULT BalBaseBAFunctionsProcOnThemeControlLoading( | 27 | static HRESULT BalBaseBAFunctionsProcOnThemeControlLoading( |
diff --git a/src/api/burn/balutil/inc/IBAFunctions.h b/src/api/burn/balutil/inc/IBAFunctions.h index 2e71608d..50126ba1 100644 --- a/src/api/burn/balutil/inc/IBAFunctions.h +++ b/src/api/burn/balutil/inc/IBAFunctions.h | |||
@@ -7,20 +7,18 @@ DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49 | |||
7 | // OnThemeLoaded - Called after the BA finished loading all the controls for the theme. | 7 | // OnThemeLoaded - Called after the BA finished loading all the controls for the theme. |
8 | // | 8 | // |
9 | STDMETHOD(OnThemeLoaded)( | 9 | STDMETHOD(OnThemeLoaded)( |
10 | THEME* pTheme, | 10 | __in HWND hWnd |
11 | WIX_LOCALIZATION* pWixLoc | ||
12 | ) = 0; | 11 | ) = 0; |
13 | 12 | ||
14 | // WndProc - Called if the BA hasn't handled the message. | 13 | // WndProc - Called if the BA hasn't handled the message. |
15 | // The implementation must either return E_NOTIMPL or call ThemeDefWindowProc for unhandled messages. | ||
16 | // | 14 | // |
17 | STDMETHOD(WndProc)( | 15 | STDMETHOD(WndProc)( |
18 | __in THEME* pTheme, | ||
19 | __in HWND hWnd, | 16 | __in HWND hWnd, |
20 | __in UINT uMsg, | 17 | __in UINT uMsg, |
21 | __in WPARAM wParam, | 18 | __in WPARAM wParam, |
22 | __in LPARAM lParam, | 19 | __in LPARAM lParam, |
23 | __inout LRESULT* plRes | 20 | __inout BOOL* pfProcessed, |
21 | __inout LRESULT* plResult | ||
24 | ) = 0; | 22 | ) = 0; |
25 | 23 | ||
26 | // BAFunctionsProc - The PFN_BA_FUNCTIONS_PROC can call this method to give the BAFunctions raw access to the callback from WixStdBA. | 24 | // BAFunctionsProc - The PFN_BA_FUNCTIONS_PROC can call this method to give the BAFunctions raw access to the callback from WixStdBA. |
diff --git a/src/api/burn/test/BalUtilUnitTest/precomp.h b/src/api/burn/test/BalUtilUnitTest/precomp.h index f4a35e20..ce893906 100644 --- a/src/api/burn/test/BalUtilUnitTest/precomp.h +++ b/src/api/burn/test/BalUtilUnitTest/precomp.h | |||
@@ -14,8 +14,6 @@ | |||
14 | 14 | ||
15 | #include <dutil.h> | 15 | #include <dutil.h> |
16 | #include <dictutil.h> | 16 | #include <dictutil.h> |
17 | #include <locutil.h> | ||
18 | #include <thmutil.h> | ||
19 | 17 | ||
20 | #include <BootstrapperEngine.h> | 18 | #include <BootstrapperEngine.h> |
21 | #include <BootstrapperApplication.h> | 19 | #include <BootstrapperApplication.h> |
diff --git a/src/ext/Bal/Samples/bafunctions/precomp.h b/src/ext/Bal/Samples/bafunctions/precomp.h index 832d2250..cda11a40 100644 --- a/src/ext/Bal/Samples/bafunctions/precomp.h +++ b/src/ext/Bal/Samples/bafunctions/precomp.h | |||
@@ -23,13 +23,13 @@ | |||
23 | #include "dictutil.h" | 23 | #include "dictutil.h" |
24 | //#include "dirutil.h" | 24 | //#include "dirutil.h" |
25 | #include "fileutil.h" | 25 | #include "fileutil.h" |
26 | #include "locutil.h" | 26 | //#include "locutil.h" |
27 | //#include "logutil.h" | 27 | //#include "logutil.h" |
28 | #include "pathutil.h" | 28 | #include "pathutil.h" |
29 | //#include "resrutil.h" | 29 | //#include "resrutil.h" |
30 | //#include "shelutil.h" | 30 | //#include "shelutil.h" |
31 | #include "strutil.h" | 31 | #include "strutil.h" |
32 | #include "thmutil.h" | 32 | //#include "thmutil.h" |
33 | //#include "uriutil.h" | 33 | //#include "uriutil.h" |
34 | //#include "xmlutil.h" | 34 | //#include "xmlutil.h" |
35 | #include "regutil.h" | 35 | #include "regutil.h" |
diff --git a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp index 5546b74f..cdb9d017 100644 --- a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp | |||
@@ -2783,7 +2783,6 @@ private: | |||
2783 | if (pBA->m_pfnBAFunctionsProc) | 2783 | if (pBA->m_pfnBAFunctionsProc) |
2784 | { | 2784 | { |
2785 | wndProcArgs.cbSize = sizeof(wndProcArgs); | 2785 | wndProcArgs.cbSize = sizeof(wndProcArgs); |
2786 | wndProcArgs.pTheme = pTheme; | ||
2787 | wndProcArgs.hWnd = hWnd; | 2786 | wndProcArgs.hWnd = hWnd; |
2788 | wndProcArgs.uMsg = uMsg; | 2787 | wndProcArgs.uMsg = uMsg; |
2789 | wndProcArgs.wParam = wParam; | 2788 | wndProcArgs.wParam = wParam; |
@@ -2791,10 +2790,20 @@ private: | |||
2791 | wndProcResults.cbSize = sizeof(wndProcResults); | 2790 | wndProcResults.cbSize = sizeof(wndProcResults); |
2792 | 2791 | ||
2793 | hr = pBA->m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_WNDPROC, &wndProcArgs, &wndProcResults, pBA->m_pvBAFunctionsProcContext); | 2792 | hr = pBA->m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_WNDPROC, &wndProcArgs, &wndProcResults, pBA->m_pvBAFunctionsProcContext); |
2794 | if (E_NOTIMPL != hr) | 2793 | |
2794 | if (E_NOTIMPL == hr) | ||
2795 | { | 2795 | { |
2796 | lres = wndProcResults.lres; | 2796 | hr = S_OK; |
2797 | ExitFunction(); | 2797 | } |
2798 | else | ||
2799 | { | ||
2800 | BalExitOnFailure(hr, "BAFunctions WndProc failed."); | ||
2801 | |||
2802 | if (wndProcResults.fProcessed) | ||
2803 | { | ||
2804 | lres = wndProcResults.lResult; | ||
2805 | ExitFunction(); | ||
2806 | } | ||
2798 | } | 2807 | } |
2799 | } | 2808 | } |
2800 | } | 2809 | } |
@@ -2910,8 +2919,7 @@ private: | |||
2910 | if (m_pfnBAFunctionsProc) | 2919 | if (m_pfnBAFunctionsProc) |
2911 | { | 2920 | { |
2912 | themeLoadedArgs.cbSize = sizeof(themeLoadedArgs); | 2921 | themeLoadedArgs.cbSize = sizeof(themeLoadedArgs); |
2913 | themeLoadedArgs.pTheme = m_pTheme; | 2922 | themeLoadedArgs.hWnd = m_pTheme->hwndParent; |
2914 | themeLoadedArgs.pWixLoc = m_pWixLoc; | ||
2915 | themeLoadedResults.cbSize = sizeof(themeLoadedResults); | 2923 | themeLoadedResults.cbSize = sizeof(themeLoadedResults); |
2916 | hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMELOADED, &themeLoadedArgs, &themeLoadedResults, m_pvBAFunctionsProcContext); | 2924 | hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMELOADED, &themeLoadedArgs, &themeLoadedResults, m_pvBAFunctionsProcContext); |
2917 | BalExitOnFailure(hr, "BAFunctions OnThemeLoaded failed."); | 2925 | BalExitOnFailure(hr, "BAFunctions OnThemeLoaded failed."); |
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp index 8304403a..e5ff9131 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp | |||
@@ -100,7 +100,7 @@ private: | |||
100 | hr = CreateTestingWindow(); | 100 | hr = CreateTestingWindow(); |
101 | BalExitOnFailure(hr, "Failed to create BafThmUtilTesting window."); | 101 | BalExitOnFailure(hr, "Failed to create BafThmUtilTesting window."); |
102 | 102 | ||
103 | ::EnableWindow(m_pTheme->hwndParent, FALSE); | 103 | ::EnableWindow(m_hwndParent, FALSE); |
104 | 104 | ||
105 | // message pump | 105 | // message pump |
106 | while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0))) | 106 | while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0))) |
@@ -118,7 +118,7 @@ private: | |||
118 | } | 118 | } |
119 | 119 | ||
120 | LExit: | 120 | LExit: |
121 | ::EnableWindow(m_pTheme->hwndParent, TRUE); | 121 | ::EnableWindow(m_hwndParent, TRUE); |
122 | 122 | ||
123 | DestroyTestingWindow(); | 123 | DestroyTestingWindow(); |
124 | 124 | ||
@@ -130,7 +130,7 @@ private: | |||
130 | HRESULT CreateTestingWindow() | 130 | HRESULT CreateTestingWindow() |
131 | { | 131 | { |
132 | HRESULT hr = S_OK; | 132 | HRESULT hr = S_OK; |
133 | HICON hIcon = reinterpret_cast<HICON>(m_pTheme->hIcon); | 133 | HICON hIcon = reinterpret_cast<HICON>(m_pBafTheme->hIcon); |
134 | WNDCLASSW wc = { }; | 134 | WNDCLASSW wc = { }; |
135 | int x = CW_USEDEFAULT; | 135 | int x = CW_USEDEFAULT; |
136 | int y = CW_USEDEFAULT; | 136 | int y = CW_USEDEFAULT; |
@@ -151,7 +151,7 @@ private: | |||
151 | wc.hInstance = m_hModule; | 151 | wc.hInstance = m_hModule; |
152 | wc.hIcon = hIcon; | 152 | wc.hIcon = hIcon; |
153 | wc.hCursor = ::LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); | 153 | wc.hCursor = ::LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); |
154 | wc.hbrBackground = m_pTheme->rgFonts[m_pBafTheme->dwFontId].hBackground; | 154 | wc.hbrBackground = m_pBafTheme->rgFonts[m_pBafTheme->dwFontId].hBackground; |
155 | wc.lpszMenuName = NULL; | 155 | wc.lpszMenuName = NULL; |
156 | wc.lpszClassName = BAFTHMUTILTESTING_WINDOW_CLASS; | 156 | wc.lpszClassName = BAFTHMUTILTESTING_WINDOW_CLASS; |
157 | if (!::RegisterClassW(&wc)) | 157 | if (!::RegisterClassW(&wc)) |
@@ -168,7 +168,7 @@ private: | |||
168 | y = ptCursor.y; | 168 | y = ptCursor.y; |
169 | } | 169 | } |
170 | 170 | ||
171 | hr = ThemeCreateParentWindow(m_pBafTheme, 0, wc.lpszClassName, m_pBafTheme->sczCaption, m_pBafTheme->dwStyle, x, y, m_pTheme->hwndParent, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWndBaf); | 171 | hr = ThemeCreateParentWindow(m_pBafTheme, 0, wc.lpszClassName, m_pBafTheme->sczCaption, m_pBafTheme->dwStyle, x, y, m_hwndParent, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWndBaf); |
172 | ExitOnFailure(hr, "Failed to create window."); | 172 | ExitOnFailure(hr, "Failed to create window."); |
173 | 173 | ||
174 | hr = S_OK; | 174 | hr = S_OK; |
@@ -216,7 +216,7 @@ private: | |||
216 | case WM_CLOSE: | 216 | case WM_CLOSE: |
217 | if (pBaf) | 217 | if (pBaf) |
218 | { | 218 | { |
219 | ::EnableWindow(pBaf->m_pTheme->hwndParent, TRUE); | 219 | ::EnableWindow(pBaf->m_hwndParent, TRUE); |
220 | } | 220 | } |
221 | 221 | ||
222 | break; | 222 | break; |