Ticket #14746 (closed defect: duplicate)
wxProgressDialog with constructor's flag "wxPD_APP_MODAL" is not modal
| Reported by: | ghostvoodooman | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | wxMSW | Version: | 2.9-svn |
| Keywords: | wxProgressDialog wxPD_APP_MODAL | Cc: | |
| Blocked By: | Patch: | no | |
| Blocking: |
Description
In ticket #14743 Vadim suggested to me to use class wxProgressDialog as a progress dialog.
Using SVN r72621, Windows Vista x64, my custom x64 build of WX.
I initialize the class as:
wxProgressDialog* progress=new wxProgressDialog(wxS("Progress..."),wxS("0%"),100,NULL,wxPD_APP_MODAL | wxPD_SMOOTH | wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME);
next, I am creating new windows/wxFrames from the same, main application thread, in time-consuming operation, each new window is created like every 5 or 10 seconds.
From time to time (like every second) I call from the main application thread:
double percent=<compute number of percent's>; // pseudo-code wxString m=wxS(<compute number of percent's as a string message for user>); // pseudo-code progress->Update((int)percent,m); // real code
This progress dialog is on the top (I mean Z-order) of the subsequently created windows. The defect is (rather cosmetic), when I click on subsequently created window, wxProgressDialog is not any more on the top of all windows (in Z-order), newly created windows are at the top in Z-order, which means the wxProgressDialog is NOT modal, as constructor flag wxPD_APP_MODAL says.
