Solved

Dialog and Messagebox Z-Order Problem

Posted on 2001-06-20
12
215 Views
Last Modified: 2013-11-20
0
Comment
Question by:ulischmidt
  • 4
  • 3
  • 2
  • +3
12 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6211367
>> no text

No comment!
0
 

Author Comment

by:ulischmidt
ID: 6211552
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
0
 
LVL 30

Expert Comment

by:Axter
ID: 6212604
That means you have the property settings wrong on your Dialog resource.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 30

Expert Comment

by:Axter
ID: 6212606
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.
0
 

Author Comment

by:ulischmidt
ID: 6213186
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,.... :(
0
 
LVL 6

Expert Comment

by:MichaelS
ID: 6213480
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?
0
 

Author Comment

by:ulischmidt
ID: 6213593
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????

0
 
LVL 30

Accepted Solution

by:
Axter earned 100 total points
ID: 6213731
Could you post the property settings for the dialog you're having problems with?
0
 
LVL 12

Expert Comment

by:migel
ID: 6213825
Hi!
what parent you pass to modal dialog?
0
 

Author Comment

by:ulischmidt
ID: 6213935
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.
0
 
LVL 6

Expert Comment

by:MichaelS
ID: 6214286
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).
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9490028
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
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
cat dog challenge 18 124
conditional code and condition difference 9 82
Window placement 17 83
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question