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/test | |
| 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/test')
| -rw-r--r-- | src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp | 70 |
1 files changed, 28 insertions, 42 deletions
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp index b35b4e02..a5bcba3e 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp | |||
| @@ -43,62 +43,48 @@ static void CALLBACK BafThmUtilTestingTraceError( | |||
| 43 | class CBafThmUtilTesting : public CBalBaseBAFunctions | 43 | class CBafThmUtilTesting : public CBalBaseBAFunctions |
| 44 | { | 44 | { |
| 45 | public: // IBAFunctions | 45 | public: // IBAFunctions |
| 46 | /*virtual STDMETHODIMP OnThemeLoaded( | 46 | virtual STDMETHODIMP OnThemeControlLoading( |
| 47 | THEME* pTheme, | 47 | __in LPCWSTR wzName, |
| 48 | WIX_LOCALIZATION* pWixLoc | 48 | __inout BOOL* pfProcessed, |
| 49 | __inout WORD* pwId | ||
| 49 | ) | 50 | ) |
| 50 | { | 51 | { |
| 51 | HRESULT hr = S_OK; | 52 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzName, -1, L"InstallTestButton", -1)) |
| 52 | 53 | { | |
| 53 | hr = __super::OnThemeLoaded(pTheme, pWixLoc); | 54 | *pfProcessed = TRUE; |
| 55 | *pwId = BAF_CONTROL_INSTALL_TEST_BUTTON; | ||
| 56 | } | ||
| 54 | 57 | ||
| 55 | return hr; | 58 | return S_OK; |
| 56 | }*/ | 59 | } |
| 57 | 60 | ||
| 58 | virtual STDMETHODIMP WndProc( | 61 | virtual STDMETHODIMP OnThemeControlWmCommand( |
| 59 | __in THEME* pTheme, | ||
| 60 | __in HWND hWnd, | ||
| 61 | __in UINT uMsg, | ||
| 62 | __in WPARAM wParam, | 62 | __in WPARAM wParam, |
| 63 | __in LPARAM lParam, | 63 | __in LPCWSTR /*wzName*/, |
| 64 | __inout LRESULT* plRes | 64 | __in WORD wId, |
| 65 | __in HWND /*hWnd*/, | ||
| 66 | __inout BOOL* pfProcessed, | ||
| 67 | __inout LRESULT* plResult | ||
| 65 | ) | 68 | ) |
| 66 | { | 69 | { |
| 67 | switch (uMsg) | 70 | HRESULT hr = S_OK; |
| 71 | |||
| 72 | switch (HIWORD(wParam)) | ||
| 68 | { | 73 | { |
| 69 | case WM_COMMAND: | 74 | case BN_CLICKED: |
| 70 | switch (HIWORD(wParam)) | 75 | switch (wId) |
| 71 | { | 76 | { |
| 72 | case BN_CLICKED: | 77 | case BAF_CONTROL_INSTALL_TEST_BUTTON: |
| 73 | switch (LOWORD(wParam)) | 78 | OnShowTheme(); |
| 74 | { | 79 | *pfProcessed = TRUE; |
| 75 | case BAF_CONTROL_INSTALL_TEST_BUTTON: | 80 | *plResult = 0; |
| 76 | OnShowTheme(); | ||
| 77 | *plRes = 0; | ||
| 78 | return S_OK; | ||
| 79 | } | ||
| 80 | |||
| 81 | break; | 81 | break; |
| 82 | } | 82 | } |
| 83 | break; | ||
| 84 | } | ||
| 85 | |||
| 86 | return __super::WndProc(pTheme, hWnd, uMsg, wParam, lParam, plRes); | ||
| 87 | } | ||
| 88 | 83 | ||
| 89 | virtual STDMETHODIMP OnThemeControlLoading( | 84 | break; |
| 90 | __in LPCWSTR wzName, | ||
| 91 | __inout BOOL* pfProcessed, | ||
| 92 | __inout WORD* pwId | ||
| 93 | ) | ||
| 94 | { | ||
| 95 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzName, -1, L"InstallTestButton", -1)) | ||
| 96 | { | ||
| 97 | *pfProcessed = TRUE; | ||
| 98 | *pwId = BAF_CONTROL_INSTALL_TEST_BUTTON; | ||
| 99 | } | 85 | } |
| 100 | 86 | ||
| 101 | return S_OK; | 87 | return hr; |
| 102 | } | 88 | } |
| 103 | 89 | ||
| 104 | private: | 90 | private: |
