Not as simple as it looks

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a form that opens several modeless dialogs. Sometimes they become
covered by other (unrelated) applications and its annoying to click on each
dialog to make them visible again. I would like all dialogs to become
visible when main form becomes visible. Main form keeps pointers to modeless
dialogs.

Here is what I tried:
- Created an Activate event handler for the main form and inserted a call to
dlg.BringToFront(). The main form becomes not operational (it wouldn't react
to any commands).

- Put a call to dlg.BringToFront() in main form Paint event handler. It's a
little better, but main form stops reacting if dialog overlaps with it.

- Replace dlg.BringToFront() with dlg.Invalidate() to force repainting. Does
nothing (dialog stays covered.

- In the main for Activate or Paint handlers also call the base class. Does
nothing (Activate) or makes it worse (Paint)

Any ideas?

Gregory Khrapunovich


.



Relevant Pages

  • Re: Help in creating dialog based application
    ... Note that hiding the main dialog will usually hide the modeless dialogs as well; ... Local Explorer and see how I did complex tabbed dialogs. ... dialog as parent but how i will inform the parent window to distroy ...
    (microsoft.public.vc.mfc)
  • Re: I lost something in the dialogs!
    ... >> Underneath the tools there used to be a choice as to paint with pattern ... > dockable dialogs here'). ... Michael Soibelman:~) ...
    (comp.graphics.apps.gimp)
  • Re: problem with flickering in dialog
    ... If you have prepared view with modeless dialogs like you described, ... description and I have no problem with flickering. ... I used CView derived class ...
    (microsoft.public.vc.mfc)
  • Re: CScrollView constructor
    ... In last application version all controls are placed in one very ... The best solution is to partiion them to several smaller dialogs. ... Scrolling them is even more peculiar, because modeless dialogs would ...
    (microsoft.public.vc.mfc)
  • Re: CScrollView constructor
    ... You create a tabbed dialog which has the special controls on child dialogs on ... and the always-visible controls are on the tabbed dialog surface itself. ... And it makes no sense to say "place modeless dialogs in a view" because modeless ... >screen so scrolling must be implemented. ...
    (microsoft.public.vc.mfc)