Move taskbar button from wxTopLevelWindowMSW to wxFrame.
Since there are two sub-classes of wxTopLevelWindowMSW: one is wxFrame, the other is wxDialog. However, wxDialog have no button shown in taskbar on windows, so the taskbar button feature should be only avaiable in wxFrame. Author: Chaobin Zhang git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
#ifndef _WX_FRAME_H_
|
||||
#define _WX_FRAME_H_
|
||||
|
||||
#if wxUSE_TASKBARBUTTON
|
||||
class WXDLLIMPEXP_FWD_ADV wxTaskBarButton;
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
||||
{
|
||||
public:
|
||||
@@ -109,6 +113,15 @@ public:
|
||||
virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TASKBARBUTTON
|
||||
// Return the taskbar button of the window.
|
||||
//
|
||||
// The pointer returned by this method belongs to the window and will be
|
||||
// deleted when the window itself is, do not delete it yourself. May return
|
||||
// NULL if the initialization of taskbar button failed.
|
||||
wxTaskBarButton* MSWGetTaskBarButton();
|
||||
#endif // wxUSE_TASKBARBUTTON
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
@@ -165,6 +178,10 @@ private:
|
||||
// used by IconizeChildFrames(), see comments there
|
||||
bool m_wasMinimized;
|
||||
|
||||
#if wxUSE_TASKBARBUTTON
|
||||
wxTaskBarButton *m_taskBarButton;
|
||||
#endif
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame)
|
||||
};
|
||||
|
Reference in New Issue
Block a user