Register message "TaskbarButtonCreated" when wxTopLevelWindowMSW is created.

This message is used to make sure the taskbar button is in place, so
wxTaskbarButton object can initialize correctly.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chaobin, Zhang 2014-09-10 08:34:36 +00:00
parent 559ccd703d
commit ed47c030cd

View File

@ -63,6 +63,18 @@
#define ICON_SMALL 0
#endif
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
#if wxUSE_MENUS || wxUSE_MENUS_NATIVE
extern wxMenu *wxCurrentPopupMenu;
#endif // wxUSE_MENUS || wxUSE_MENUS_NATIVE
#if wxUSE_TASKBARBUTTON
static WXUINT gs_msgTaskbarButtonCreated = 0;
#endif
// ----------------------------------------------------------------------------
// stubs for missing functions under MicroWindows
// ----------------------------------------------------------------------------
@ -415,6 +427,12 @@ WXLRESULT wxTopLevelWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WX
}
break;
}
#if wxUSE_TASKBARBUTTON
if ( message == gs_msgTaskbarButtonCreated )
{
processed = true;
}
#endif
if ( !processed )
rc = wxTopLevelWindowBase::MSWWindowProc(message, wParam, lParam);
@ -631,6 +649,10 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
SetRightMenu(); // to nothing for initialization
#endif
#if wxUSE_TASKBARBUTTON
gs_msgTaskbarButtonCreated =
::RegisterWindowMessage(wxT("TaskbarButtonCreated"));
#endif
return ret;
}