Revise progress releted API to be more usual.
- Add PulseProgress - Add SetProgressRange, instead of hard coding 100. Author: Chaobin Zhang git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -262,6 +262,13 @@ wxEND_EVENT_TABLE()
|
||||
|
||||
void MyFrame::OnSetProgressValue(wxScrollEvent& WXUNUSED(event))
|
||||
{
|
||||
static bool s_hasRangeSet = false;
|
||||
if ( !s_hasRangeSet )
|
||||
{
|
||||
MSWGetTaskBarButton()->SetProgressRange(100);
|
||||
s_hasRangeSet = true;
|
||||
}
|
||||
|
||||
MSWGetTaskBarButton()->SetProgressValue(m_slider->GetValue());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user