#include "wx/intl.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
+ #include "wx/timer.h"
#endif
#include "wx/generic/progdlgg.h"
int maximum,
wxWindow *parent,
int style)
- : wxDialog(m_parent, -1, title)
+ : wxDialog(parent, -1, title)
{
bool hasAbortButton = (style & wxPD_CAN_ABORT) != 0;
m_state = hasAbortButton ? Continue : Uncancelable;
m_disableParentOnly = (style & wxPD_APP_MODAL) == 0;
+ m_AutoHide = (style & wxPD_AUTO_HIDE) != 0;
m_parent = parent;
m_maximum = maximum;
wxClientDC dc(this);
dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
long widthText;
- dc.GetTextExtent(message, &widthText, NULL);
+#if defined(__VISAGECPP__)
+// have two versions of this in wxWindowDC tp avoid function hiding
+// since there are two of these in wxDCBase, and in turn in wxDC.
+// VA cannot resolve this so:
+ dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL);
+#else
+ dc.GetTextExtent(message, &widthText, (long*)NULL);
+#endif
m_msg = new wxStaticText(this, -1, message);
c = new wxLayoutConstraints;
m_gauge = (wxGauge *)NULL;
// create the estimated/remaining/total time zones if requested
- m_elapsed = m_estimated = m_remaining = NULL;
+ m_elapsed = m_estimated = m_remaining = (wxStaticText*)NULL;
int nTimeLabels = 0;
if ( style & wxPD_ELAPSED_TIME )
Show(TRUE);
Enable(TRUE); // enable this window
+
+ // Update the display (especially on X, GTK)
+ wxYield();
}
wxStaticText *wxProgressDialog::CreateLabel(const wxString& text,
SetTimeLabel(remaining, m_remaining);
}
- if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) )
+ if ( (value == m_maximum ) && !m_AutoHide )
{
if ( m_btnAbort )
{