X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b61f868b597a84fd3c589b2e8539624c491f86b..dc6c62a931cd31cff4bd7c621301d443a41dee5c:/src/generic/progdlgg.cpp diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index adde5d7978..281efc5183 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -100,7 +100,14 @@ wxProgressDialog::wxProgressDialog(wxString const &title, 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, FALSE); +#else + dc.GetTextExtent(message, &widthText, (long*)NULL); +#endif m_msg = new wxStaticText(this, -1, message); c = new wxLayoutConstraints; @@ -136,7 +143,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, 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 ) @@ -217,6 +224,9 @@ wxProgressDialog::wxProgressDialog(wxString const &title, Show(TRUE); Enable(TRUE); // enable this window + + // Update the display (especially on X, GTK) + wxYield(); } wxStaticText *wxProgressDialog::CreateLabel(const wxString& text,