Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When is a modal dialog not modal ?????

Status
Not open for further replies.

SpenBabe

Programmer
Sep 25, 2000
70
0
0
GB
I have a simple SDI application that constructs CDialog-based objects & calls DoModal() on them. Everything is fine except that 3 dialogs are not just for data entry with a OK & a Cancel button. These 3 dialogs process records in a database & show a progress bar as they proceed. Whilst they are busy reading records & updating the progress bar, the users can click on the Minimize('_') button of the MainFrame and it send the whole app to the taskbar with no way of restoring it (until the Dialog ends).

I have trying catching the Minimize button with OnSysCommand in the MainFrame, but it never sends the message there (only when the MainFrame is the active window)

I know I can avoid the problem by minimizing the MainFrame before calling DoModal, but that raises other issues.

Any ideas ? (I suspect it has something to do with the Dialog being busy but the MainFrame is idle) Spencer Window (not a joke name)
spencer.window@eastmidlandcomputers.ltd.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top