wxUICanceller: Move upstream and make reusable

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2020-02-06 12:16:52 +01:00
parent 3bd2d1fd09
commit cd0a99c518
3 changed files with 50 additions and 23 deletions

View File

@@ -463,6 +463,30 @@ protected:
};
///
/// Closes active window if exists
///
class wxUICanceller
{
public:
///
/// Send WM_CLOSE to the active window if it exists.
///
/// \param[inout] hWndCurrent Reference to a handle of the active window is stored. The variable should be shared between threads.
/// \param[in] hWnd Handle of a new window to be activated
///
wxUICanceller(_Inout_ HWND volatile &hWndCurrent, _In_ HWND hWnd);
///
/// Clears the active window handle.
///
~wxUICanceller();
protected:
HWND volatile &m_hWndCurrent;
};
///
/// EAP general note
///