- //
- // Disables other app windows and window proc message processing
- // until WinDismissDlg called
- //
- ::WinProcessDlg((HWND)GetHwnd());
-
- //
- // Before entering the modal loop, reset the "is in OnIdle()" flag (see
- // comment in app.cpp)
- //
- extern bool gbInOnIdle;
- bool bWasInOnIdle = gbInOnIdle;
-
- gbInOnIdle = FALSE;
-
- // enter the modal loop
- {
- wxDialogModalDataTiedPtr modalData(&m_modalData,
- new wxDialogModalData(this));
- modalData->RunLoop();
- }
- gbInOnIdle = bWasInOnIdle;
-
- //
- // and restore focus
- // Note that this code MUST NOT access the dialog object's data
- // in case the object has been deleted (which will be the case
- // for a modal dialog that has been destroyed before calling EndModal).
- //
- if (pOldFocus && (pOldFocus != this) && ::WinIsWindow(vHabmain, hWndOldFocus))
- {
- //
- // This is likely to prove that the object still exists
- //
- if (wxFindWinFromHandle((WXHWND) hWndOldFocus) == pOldFocus)
- pOldFocus->SetFocus();
- }
-} // end of wxDialog::DoShowModal
-
-bool wxDialog::Show(
- bool bShow
-)