Enable the HWND of the task dialog to be fetched with GetHandle if it is being used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-09-10 03:26:37 +00:00
parent 1a66177951
commit 01bd848eb9
2 changed files with 19 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ public:
// Must provide overload to avoid hiding it (and warnings about it)
virtual void Update() { wxGenericProgressDialog::Update(); }
virtual WXWidget GetHandle() const;
private:
// Performs common routines to Update() and Pulse(). Requires the
// shared object to have been entered.

View File

@@ -518,6 +518,23 @@ void wxProgressDialog::Resume()
#endif // wxHAS_MSW_TASKDIALOG
}
WXWidget wxProgressDialog::GetHandle() const
{
#ifdef wxHAS_MSW_TASKDIALOG
if ( HasNativeTaskDialog() )
{
HWND hwnd;
{
wxCriticalSectionLocker locker(m_sharedData->m_cs);
m_sharedData->m_state = m_state;
hwnd = m_sharedData->m_hwnd;
}
return hwnd;
}
#endif
return wxGenericProgressDialog::GetHandle();
}
int wxProgressDialog::GetValue() const
{
#ifdef wxHAS_MSW_TASKDIALOG