Link to home
Start Free TrialLog in
Avatar of ulischmidt
ulischmidt

asked on

Dialog and Messagebox Z-Order Problem

Avatar of jhance
jhance

>> no text

No comment!
Avatar of ulischmidt

ASKER

In my MFC Multidoc App there's a problem with the Z-Order of modal dialogs an (Afx)Messageboxes:
If they're called, they don't appear and the app seems to hang! If i then press the ALT key, they appear
with the focus on the system menu.....????

Can you help?

Thanks
Uli
Avatar of Axter
That means you have the property settings wrong on your Dialog resource.
The easiest way to figure it out is to create a new dialog.
Then check each settings one by one, and make sure your current dialog has the same settings as the new dialog.
The new dialog will have the correct property settings by default.
Yes Axter, I've done this, but with no result....also the
Messageboxes have the same effect, i tried with a lot of flags and with no flags,.... :(
Looks like you working under w2k, and if so than you have to read documentation. In w2k thay (MS) changed things about current focus. Also in your app you have few threads (may be not but sounds like that). Can you show your code of give us some more detailes about it?
OK sorry for the poor info..
I'm working under Win98 II and the 'hidden' dialogs are called from a CScrollView in another MFC-dll.
There are some timers working in this MFC dll...
If nothing helps, i would make the dialog topmost...
But what about the messageboxes????

ASKER CERTIFIED SOLUTION
Avatar of Axter
Axter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi!
what parent you pass to modal dialog?
OK Axter thanks...
I tried some settings (NON STANDARD!) :Set ForeGround and Overlapped, now it appears correct, i just have to check out the messageboxes....if all is ok, i give u the points.
SetForegroundWindow and BringWindowToTop is an API, this is standard functions and you even must use it, other wise it will not work under w2k (at least).
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by : Axter

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer