diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-10-27 14:42:32 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-11-01 16:34:09 -0500 |
| commit | bad2e93524f376cfeb76d5231d4b08510bdad033 (patch) | |
| tree | b201ec4b1495a0af4805ea6b0bc4fce9f8bde7b7 /src/api/burn | |
| parent | 8fa040da9d0d3826f5ffda6bcbec4f53abd97452 (diff) | |
| download | wix-bad2e93524f376cfeb76d5231d4b08510bdad033.tar.gz wix-bad2e93524f376cfeb76d5231d4b08510bdad033.tar.bz2 wix-bad2e93524f376cfeb76d5231d4b08510bdad033.zip | |
Add more thmutil window messages to simplify handling control events.
Diffstat (limited to 'src/api/burn')
| -rw-r--r-- | src/api/burn/balutil/inc/BAFunctions.h | 34 | ||||
| -rw-r--r-- | src/api/burn/balutil/inc/BalBaseBAFunctions.h | 24 | ||||
| -rw-r--r-- | src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | 24 | ||||
| -rw-r--r-- | src/api/burn/balutil/inc/IBAFunctions.h | 22 |
4 files changed, 104 insertions, 0 deletions
diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h index 2a34aaad..ab6ea4d7 100644 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ b/src/api/burn/balutil/inc/BAFunctions.h | |||
| @@ -86,6 +86,8 @@ enum BA_FUNCTIONS_MESSAGE | |||
| 86 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, | 86 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, |
| 87 | BA_FUNCTIONS_MESSAGE_WNDPROC, | 87 | BA_FUNCTIONS_MESSAGE_WNDPROC, |
| 88 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING, | 88 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING, |
| 89 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND, | ||
| 90 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMNOTIFY, | ||
| 89 | }; | 91 | }; |
| 90 | 92 | ||
| 91 | typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_PROC)( | 93 | typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_PROC)( |
| @@ -126,6 +128,38 @@ struct BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS | |||
| 126 | WORD wId; | 128 | WORD wId; |
| 127 | }; | 129 | }; |
| 128 | 130 | ||
| 131 | struct BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS | ||
| 132 | { | ||
| 133 | DWORD cbSize; | ||
| 134 | WPARAM wParam; | ||
| 135 | LPCWSTR wzName; | ||
| 136 | WORD wId; | ||
| 137 | HWND hWnd; | ||
| 138 | }; | ||
| 139 | |||
| 140 | struct BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS | ||
| 141 | { | ||
| 142 | DWORD cbSize; | ||
| 143 | BOOL fProcessed; | ||
| 144 | LRESULT lResult; | ||
| 145 | }; | ||
| 146 | |||
| 147 | struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS | ||
| 148 | { | ||
| 149 | DWORD cbSize; | ||
| 150 | LPNMHDR lParam; | ||
| 151 | LPCWSTR wzName; | ||
| 152 | WORD wId; | ||
| 153 | HWND hWnd; | ||
| 154 | }; | ||
| 155 | |||
| 156 | struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS | ||
| 157 | { | ||
| 158 | DWORD cbSize; | ||
| 159 | BOOL fProcessed; | ||
| 160 | LRESULT lResult; | ||
| 161 | }; | ||
| 162 | |||
| 129 | struct BA_FUNCTIONS_ONTHEMELOADED_ARGS | 163 | struct BA_FUNCTIONS_ONTHEMELOADED_ARGS |
| 130 | { | 164 | { |
| 131 | DWORD cbSize; | 165 | DWORD cbSize; |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h index c2c8a6dc..f6c33f58 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h | |||
| @@ -850,6 +850,30 @@ public: // IBAFunctions | |||
| 850 | return S_OK; | 850 | return S_OK; |
| 851 | } | 851 | } |
| 852 | 852 | ||
| 853 | virtual STDMETHODIMP OnThemeControlWmCommand( | ||
| 854 | __in WPARAM /*wParam*/, | ||
| 855 | __in LPCWSTR /*wzName*/, | ||
| 856 | __in WORD /*wId*/, | ||
| 857 | __in HWND /*hWnd*/, | ||
| 858 | __inout BOOL* /*pfProcessed*/, | ||
| 859 | __inout LRESULT* /*plResult*/ | ||
| 860 | ) | ||
| 861 | { | ||
| 862 | return S_OK; | ||
| 863 | } | ||
| 864 | |||
| 865 | virtual STDMETHODIMP OnThemeControlWmNotify( | ||
| 866 | __in LPNMHDR /*lParam*/, | ||
| 867 | __in LPCWSTR /*wzName*/, | ||
| 868 | __in WORD /*wId*/, | ||
| 869 | __in HWND /*hWnd*/, | ||
| 870 | __inout BOOL* /*pfProcessed*/, | ||
| 871 | __inout LRESULT* /*plResult*/ | ||
| 872 | ) | ||
| 873 | { | ||
| 874 | return S_OK; | ||
| 875 | } | ||
| 876 | |||
| 853 | protected: | 877 | protected: |
| 854 | CBalBaseBAFunctions( | 878 | CBalBaseBAFunctions( |
| 855 | __in HMODULE hModule, | 879 | __in HMODULE hModule, |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h index efe22ddd..1d51c5b6 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | |||
| @@ -33,6 +33,24 @@ static HRESULT BalBaseBAFunctionsProcOnThemeControlLoading( | |||
| 33 | return pBAFunctions->OnThemeControlLoading(pArgs->wzName, &pResults->fProcessed, &pResults->wId); | 33 | return pBAFunctions->OnThemeControlLoading(pArgs->wzName, &pResults->fProcessed, &pResults->wId); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | static HRESULT BalBaseBAFunctionsProcOnThemeControlWmCommand( | ||
| 37 | __in IBAFunctions* pBAFunctions, | ||
| 38 | __in BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS* pArgs, | ||
| 39 | __inout BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS* pResults | ||
| 40 | ) | ||
| 41 | { | ||
| 42 | return pBAFunctions->OnThemeControlWmCommand(pArgs->wParam, pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed, &pResults->lResult); | ||
| 43 | } | ||
| 44 | |||
| 45 | static HRESULT BalBaseBAFunctionsProcOnThemeControlWmNotify( | ||
| 46 | __in IBAFunctions* pBAFunctions, | ||
| 47 | __in BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS* pArgs, | ||
| 48 | __inout BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS* pResults | ||
| 49 | ) | ||
| 50 | { | ||
| 51 | return pBAFunctions->OnThemeControlWmNotify(pArgs->lParam, pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed, &pResults->lResult); | ||
| 52 | } | ||
| 53 | |||
| 36 | /******************************************************************* | 54 | /******************************************************************* |
| 37 | BalBaseBAFunctionsProc - requires pvContext to be of type IBAFunctions. | 55 | BalBaseBAFunctionsProc - requires pvContext to be of type IBAFunctions. |
| 38 | Provides a default mapping between the message based BAFunctions interface and | 56 | Provides a default mapping between the message based BAFunctions interface and |
| @@ -137,6 +155,12 @@ static HRESULT WINAPI BalBaseBAFunctionsProc( | |||
| 137 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING: | 155 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING: |
| 138 | hr = BalBaseBAFunctionsProcOnThemeControlLoading(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS*>(pvResults)); | 156 | hr = BalBaseBAFunctionsProcOnThemeControlLoading(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS*>(pvResults)); |
| 139 | break; | 157 | break; |
| 158 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND: | ||
| 159 | hr = BalBaseBAFunctionsProcOnThemeControlWmCommand(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS*>(pvResults)); | ||
| 160 | break; | ||
| 161 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMNOTIFY: | ||
| 162 | hr = BalBaseBAFunctionsProcOnThemeControlWmNotify(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS*>(pvResults)); | ||
| 163 | break; | ||
| 140 | } | 164 | } |
| 141 | } | 165 | } |
| 142 | 166 | ||
diff --git a/src/api/burn/balutil/inc/IBAFunctions.h b/src/api/burn/balutil/inc/IBAFunctions.h index d41b7c9b..63395e1e 100644 --- a/src/api/burn/balutil/inc/IBAFunctions.h +++ b/src/api/burn/balutil/inc/IBAFunctions.h | |||
| @@ -39,4 +39,26 @@ DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49 | |||
| 39 | __inout BOOL* pfProcessed, | 39 | __inout BOOL* pfProcessed, |
| 40 | __inout WORD* pwId | 40 | __inout WORD* pwId |
| 41 | ) = 0; | 41 | ) = 0; |
| 42 | |||
| 43 | // OnThemeControlWmCommand - Called when WM_COMMAND is received for a control. | ||
| 44 | // | ||
| 45 | STDMETHOD(OnThemeControlWmCommand)( | ||
| 46 | __in WPARAM wParam, | ||
| 47 | __in LPCWSTR wzName, | ||
| 48 | __in WORD wId, | ||
| 49 | __in HWND hWnd, | ||
| 50 | __inout BOOL* pfProcessed, | ||
| 51 | __inout LRESULT* plResult | ||
| 52 | ) = 0; | ||
| 53 | |||
| 54 | // OnThemeControlWmNotify - Called when WM_NOTIFY is received for a control. | ||
| 55 | // | ||
| 56 | STDMETHOD(OnThemeControlWmNotify)( | ||
| 57 | __in LPNMHDR lParam, | ||
| 58 | __in LPCWSTR wzName, | ||
| 59 | __in WORD wId, | ||
| 60 | __in HWND hWnd, | ||
| 61 | __inout BOOL* pfProcessed, | ||
| 62 | __inout LRESULT* plResult | ||
| 63 | ) = 0; | ||
| 42 | }; | 64 | }; |
