Hi @vadz I try to set this for wxWidgets but this tack along time from me and at last I found the proplem is at wxWidgets master repo is the dailog sapmple not work with Progress Dialog the last worked for me at b33e88d
there is som thing affect progdlg.cpp can you please fix this so I can start the PRs.
Originally posted by @memoarfaa in #26240
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I investigated a bit and it seems that when the dialog has wxPD_CAN_SKIP flag, it gets stuck in this loop
https://github.com/wxWidgets/wxWidgets/blob/7c3e00ccbd7bd1d24adbc6717902ad8819c85b79/src/msw/progdlg.cpp#L918-L923
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I investigated a bit and it seems that when the dialog has
wxPD_CAN_SKIPflag, it gets stuck in this loop
Lines 918 to 923 in 7c3e00c
while ( wxEventLoop::GetActive()->Dispatch() )
{
wxCriticalSectionLocker locker(m_sharedData->m_cs);
if ( m_sharedData->m_hwnd )
break;
}
Yes, I looked into it too, and it seems to be stuck in this vicious cycle. I might also recall some main program window logs related to focus adjustment failures.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Git bisect found the guilty commit: 02cff90 (Change return type of wxGetTranslation, Feb 15 2026).
I am testing with MSVS 2026 18.4.0.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Oh, that was my change. I guess the translated label is head-allocated instead of stack-allocated and its memory becomes invalid when out of scope. Makes me wonder if there are more of these...
diff --git "a/src/msw/progdlg.cpp" "b/src/msw/progdlg.cpp" index ed506a51ee7..ac2aa4f4f7f 100644 --- "a/src/msw/progdlg.cpp" +++ "b/src/msw/progdlg.cpp" @@ -91,6 +91,7 @@ public: wxString m_message; wxString m_expandedInformation; wxString m_labelCancel; // Privately used by callback. + wxString m_labelSkip; // Privately used by callback. unsigned long m_timeStop; wxIcon m_iconSmall; wxIcon m_iconBig; @@ -889,6 +890,7 @@ bool wxProgressDialog::Show(bool show) // just don't call it "Cancel" in this case. m_sharedData->m_labelCancel = _("Close"); } + m_sharedData->m_labelSkip = _("Skip"); if ( HasPDFlag(wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | @@ -1022,7 +1024,7 @@ void* wxProgressDialogTaskRunner::Entry() tdc.lpCallbackData = (LONG_PTR) &m_sharedData; if ( m_sharedData.m_style & wxPD_CAN_SKIP ) - wxTdc.AddTaskDialogButton( tdc, Id_SkipBtn, 0, _("Skip") ); + wxTdc.AddTaskDialogButton( tdc, Id_SkipBtn, 0, m_sharedData.m_labelSkip ); tdc.dwFlags |= TDF_CALLBACK_TIMER | TDF_SHOW_PROGRESS_BAR;
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@MaartenBent, thanks for the quick reply and solution*. I can confirm that the patch fixes the dialog not-working in the sample.
*Nitpick: the other labels are assigned only when the corresponding flag is set.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()