Use factory function for wxTaskBarButton creation.
This allows to encapsulate checking for errors, which should be handled when using this class as task bar buttons API is not available under Windows XP. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -33,12 +33,16 @@ wxAppProgressIndicator::wxAppProgressIndicator(wxWindow* parent, int maxValue)
|
||||
it != wxTopLevelWindows.end();
|
||||
++it )
|
||||
{
|
||||
m_taskBarButtons.push_back(new wxTaskBarButtonImpl(*it));
|
||||
wxTaskBarButton* const button = wxTaskBarButton::New(*it);
|
||||
if ( button )
|
||||
m_taskBarButtons.push_back(button);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_taskBarButtons.push_back(new wxTaskBarButtonImpl(parent));
|
||||
wxTaskBarButton* const button = wxTaskBarButton::New(parent);
|
||||
if ( button )
|
||||
m_taskBarButtons.push_back(button);
|
||||
}
|
||||
|
||||
Reset();
|
||||
|
||||
Reference in New Issue
Block a user