Hi guys, i'm trying to renew the old MDI app, and because of MDI cannot contains regions i have created a new Top Application panel (my EXE), to do what i want.
The big problems is with enquiry or dialogs messages.
In particular i have a Top Application EXE (my app desktop) , this panel call another Top Application or MDI Child panel (i need menubar and toolbar), if i put an enquiry message, or a dialog message my grid disappear (behind the top app exe) until i close the message.
As anyone suggestions?
like what you are doing and have moved away from mdi also. You need to look at the z order of your screens, and you can influence this with source
This should help http://www.codeproject.com/Articles/1724/Some-handy-dialog-box-tricks-tips-and-workarounds" rel="nofollow" target="_blank">http://www.codeproject.com/Articles/1724/Some-handy-dialog-box-tricks-tips-and-workarounds
or simpler why dont you down http://www.stellatools.com/downloads group model and see
Source code: StellaTools.Abstract.UIBASIC.BringWindowToFront.API.WinC.SetForegroundWindow
Source code: StellaTools.Tools.SourceCode.BringObjectBrowserWindowTop
Source code: StellaTools.Abstract.UIBASIC.RedrawPanel.API.WinC.SetWindowPos
See http://wiki.plexinfo.net/index.php?title=User_Interface_Gallery#Stella_Tools_-_AutoTestBox for three recent examples of mine which are attempting to push or at least fool the user into thinking Plex can generate current look and feels
Hi George, thanks for the answer, i have tried what you suggested but it does not work for me..
I have this source code on my MDI Child initialization (SetWindowPos)
HWND TEMP = ObPanelAPI::GetPanelHandleByName("*Current");
but it does not work, the dialog message still hide my panel behind the main.
Also tried with the SetForegroundWindow (still in the MDI Child) but with no luck.
Can you explain me what i'm doing wrong?
I take a look of your model but i don't understand the sequence of the calls, you use SetForegroundWindow and BringObjectBrowserWindowTop sources but in different panels and i dont' understand the calls sequence.
STOP and read first two Plex Help pages
1.Tips for MFC Application Design
2.Modal and Modeless Panels
You are mixing window types and getting into problems with SDI design and MDI design. I like the idea of Windows destop Metro design but how to achieve it. You need to decide what happens to the destop once you press a button. Should it spin of a new application which sounds what you are trying but still want the spun of prcess to close if you close the desktop....
Plex help warns us of:
'MDI windows should not be called in an SDI'
'but this can lead to unusual behavior at runtime. For example, if a modal dialog calls an MDI child, the modal behavior of the dialog means that the end user cannot access the child window. '
I would achieve what you want by using child sites, have a desktop which when the metor style buttions are pushed the child site is loaded and have a home button to get back to the desktop..ie reload the desktop child.
You will only run into more problems if you keep on the path you are on but if you want continue why not try from the article above. But even the author of this source warns you 'But I'd advise you to make sure you know exactly what you are doing when you do this,'
Haven't you seen programs which have an "always-stay-on-top" option? Well the unbelievable thing is that you can make your dialog stay on top with just one line of code. Simply put the following line in your dialog class'sOnInitDialog() function.
Basically what we are doing is to use the SetWindowPos function to change the Z-order of our dialog window. We make our dialog stay on top of all other windows by moving it to the top of the Z-order. Now even when you activate some other window, our window will stay on top. But I'd advise you to make sure you know exactly what you are doing when you do this, for it might annoy people if they can't get your window out of the way when they want to do that.
actually I remember experimenting with this 'Making your dialog stay on top' for StellaTools object browser and it was literally on top of every application active on the PC...not what I wanted.
what happens when the dialog message or enquiry message returns to your 'child' function, you could explicitly call StellaTools.Tools.SourceCode.BringObjectBrowserWindowTop what
but you would have to do this in the actiondiagram after all dialog/enquiry/log messages statements.
Sorry George, but the problem is not when the dialog or enquiry message return to my child (plex does this correctly) but when the message is displayed.
Here a screenshot
Behind the top app desktop (panel 1) my top app grid (panel 2) who send the enquiry message
Hi Michele -
What you describe is probably a CA Plex runtime problem and should be reported to CA. I have seen this beahviour before and decided to use child sites. A very simplistic approach to a solution: Just call .exe's from your menu. :-)
Hi Lorenz, thanks for the bad new of the runtime problem :-)
Hi George, thanks, i have now focused the point.
Bu even using and SDI design i have the same problem.
Here my sequence:
Top Application 1 (EXE)
|---> call Top Application 2 (instead of MDI child) -> enquiry message is displayed on the panel 1 and my panel 2 disappear behind
|---> call Dialog 3 -> enquiry message is displayed on the panel 1 and my panesl 2 and 3 disappear behind
Am i missing something else?