Z-ordering of an SDI application with modeless CDialog
Hello, I have some modeless CDialogs in my application. My main window
is a SDI application (CFormView in a CFrame)
My problem is that my CDialog that are not modeless are always on top of
my main window, I tried to create them with NULL as parent or
CWnd::GetDesktopWindow() but it does not seem to work.
I would like my CDialogs to behave like normal windows and to be
displayed on top when the menu action is creating them but I need the
main window to come back to the front when it is selected.
What should I investigate ? Did I do a bad thing by mixing a SDI app
Thanks...MFC-app starting WINDOWS Screensaver window z-order problem
I wrote an MFC-app using VC++.NET 2003, which starts a screensaver
It also terminates the screensaver using TerminateProcess() /
If the user activates mouse/keyboard before my app terminates the
the screensaver terminates itself and the z-order and focus-handling
of open windows somehow gets mixed up. this just happens when I use
CreateProcess(), when I use PostMessage(WM_SYSCOMMAND, SC_SCREENSAVE,
0) for the standrad-screen-saver, everything works fine, but I dont
want to use this approach.
maybe the system uses different CreateP...how to change z-order of modeless dialog
I have an app with a modeless dialog. What I want to do is when the user
clicks on the main app window, the modeless dialog should stay behind the
main window app.
Thanks for your help,
I posted the same question here a while ago, and someone suggested this
solution: Set the desktop as the parent of your modeless dialog. Use
CWnd::GetDesktopWindow() to get the CWnd * you need.
I was warned that this can cause a lot of problems, but after real-world use
in several applications, there have been none so far (frantically knocks
Give it a try and see if it does what y...Z-Ordering supported?
Does Excel (2002, 2003) support Z-Ordering of Inserted Objects?
I found it
...z-order in dialog editor
I'm getting entirely frustrated in attempting to layout a dialog and
manipulate the controls. I'm using MFC in VS2003. There doesn't appear to
be any ability within the Format menu to manipulate the z-order of the
controls on the dialog. I went into the "Customize..." dialog and found
"Bring to Front" and "Send to Back" under the Format menu. I added these to
my Format toolbar thinking that I had solved the problem. So what happened?
Nothing! I select a control and the "Bring to Front" and "Send to Back"
toolba...modeless Dialog Z-order
Is it possible to change the z-ordering of modeless dialogs, so they
don't stay on top of the parent?
This question gets answered here once a week.
The parent of both dialogs have to be the same. A child dialog can not go
behind his parent window.
See this for possible alternatives:
"Tage Korsdal Nielsen" <firstname.lastname@example.org> wrote in message
&...Z-Order and modeless CDialogs
I'm creating an dialog-based application in MFC that utilized many (or at
least some) modeless dialogs. I generally display the dialogs via calls to
Create and the ShowWindow(SW_SHOW). This all works fine, except in the
If I launch the initial dialog for the application and then subsequently
launch 2 more modeless dialogs (for now all the dialogs are based on the
same resource, if that matters), everything works fine - I can change focus
from one dialog to another. The problem is that he window ordering does not
change. If I click on the 2nd dialo...Z-Order of Topmost window (Multithreaded UI)
I see behavior which violates rules from the well-known article "Windows
I have an MFC MDI application which is a bit different from a generated by
Visual Studio Wizard:
ChildFrames are not WS_CHILD but WS_POPUP. It allows to move MDI-childs out
of the MainFrame. Looks good!
Since ChildFrames are popup windows now, they are owned by the Mainframe.
On some user action I want to create a topmost window in a separate thread.
I design it to have WS_POPUP and WS_EX_TOPMOST styles and have the active ...Dialog box "z-order" problem
I have tree dialog box opened in a SDI application. Depending of the opening
sequence, I can't put on top (topmost) some of the dialog box. I tried to
modify some settings like the "style" or the "border" of the dialog box but
without positive result. Any suggestions?
SetWindowPos( &CWnd::wndTopMost, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE );
in the OnInitDialog() function of your dialog class.
Check Abdoul [ VC++ MVP ]
"H.B." <hbcrdv@_hotmail_.com> wrote in messa...How do I know a window's z-order?
I use spy++ to get some information of a window, is there any way I can know
the window's z-order? Or in spy++ window's property, the previous window and
Next window is just the z-order? I mean that does the previous window mean
the window in front of current window, and the next window mean the one
behind current window?
Yes. Spy++ will show you the windows in z-order. The first is on top, and next is just below that,
"Nicky" <Nicky@discussions.microsoft.com> wrote in message
...Z-order Plotting Area
How can I change the Z-order of objects in the plotting area?
I Added a rectangle, which was meant to appear in the background, but it
covers my data series.
All embedded objects within the chart will appear above the actual
Maybe you could produce the rectangular area using dummy data series.
What information does the rectangle relate to in the context of your chart?
Geert Porteman wrote:
> How can I change the Z-order of objects in the plotting area?
> I Added a rectangle, which was meant to appear in the background,...how can I keep top-level windows in their relative z-order
A top level window will come to the top of the z-order (here I am assuming no
always-on-top windows) when activated, say by clicking on it.
But the owner of a top-level window will never be brought above its owned
Does anyone know of a simple way to prevent the top-level windows of an
application from changing their z-order when activated?
Why do I want to do this? I have an application that allows transparent
Flash controls. As you know, transparent Flash control must be housed in a
top-level window (Actually, they must be housed in a WS_EX_LAYERED window and
a WS_EX_LAYERED...Odd Z-order behavior
I have a Dialog app, that opens a couple of other windows in separate
threads. They are in separate threads to minimize slowing down the UI and
each other as they are displaying graphics and DirectShow windows. It's not
your typical desktop app, it's a specialized program for a specialized
purpose (just to forstall the inevitable "why would you want to have a big
black window" kinds of questions)..
I create the threads from my main dialog app using the following code:
BlackThread = new CBlackThread();
// here I set some variables that have to be inited before the t...Send form windows to the back of -global- Z-order
I know there is a function to send child form windows to the back of
an app's 'local' Z-order. And there's an easy way to send them to the
-front- of the global Z-order.
But is there any way to send them to the back of the global Z-order?
In other words, place the form windows behind all other currently
> I know there is a function to send child form windows to the back of
> an app's 'local' Z-order. And there's an easy way to send them to the
> -front- of the global Z-order.
> But is there any way to se...z-order of various lines and bars in an Excel 2007 chart
What is the procedure for changing the z-order of various lines and
bars in an Excel 2007 chart, such as drop lines, high-low lines, up/
down bars, and error bars?
I observed that when I add drop lines to an Excel 2007 chart, they
appear in front of the underlying data -- in my case, the underlying
data is displayed as a plotted area. I want the plotted area to be
fully visible with no lines over it.
I would like to send the drop lines to the back and keep the plotted
area in the front, but there is no option to do this.
So, is there a procedure for adjusting the z-order of drop...Control Z-Order of drop lines in an Excel 2007 chart?
Can anyone describe for me the procedure for changing/controlling the z-order
of drop lines relative to the plotted data in an Excel 2007 chart?
I would like for the chart's drop lines to remain active, but appear behind
the plotted data. The default display for drop lines seems to be on top.
That is the default behaviour and AFAIK there is no way to change that.
"Joseph" <Joseph@discussions.microsoft.com> wrote in message
> Can anyone describe for ...Z-order
I'm using Visual Studio .NET. I would like to change the z-order of the
controls in a dialog (the position of ones on top of others, something
like the third dimension), at design time, with the Visual Studio form
The Z-Order of the controls on a dialog defines the tab-order, so changing
the tab-order will change the Z-Order and visa-versa.
Hope this helps
"sWitCh" <mispamaki@N05PAMyaDOTcom> wrote in message
> I'm using Visual Studio .NET. I would like to change th...Big bug with Z-Ordering in MFC (or resources or whatever...)
When you put a control over another control, say for example a Button over a
Static control, the static draws itself over the button, so you cant see the
button, but when you click the button (where you guess it should be...), it
appears and presses, like it was always there...
This problem give me the creeps!
What i'm trying to do is make a window with some dynamically created
controls which have the ability to move and resize (using CRectTracker or
something similar), but can you imagine what it makes of it when one window
goes over another? and when i'm trying to fix the ZOrder some...How to set controls' Z-order
I'm trying to modify the Z order of a (CStatic label)
control so it appears on top of a (CStatic bitmap)
control. My bitmap background covers the entire dialog
window and is created in the resource editor. I want all
my controls that I create at run time to go on top of the
background. So in my OnInitDialog()..
// CStatic *Label1; (in the class decl)
Label1 = new CStatic();
Label1->Create(_T("Label1 !"), WS_CHILD|WS_VISIBLE,
CRect(700, 500, 800, 600), this);
Label1->SetWindowPos(&wndTopMost, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE);
And the label ...Z-order and child windows
1) Is there a way to get the top level window in an application, that is NOT
( GetForegroundWindow() is system wide. I want something similar that is
limited to my application only. )
2) Does EnumChildWindows include windows owned, such as modal windows or
( Or must I enumerate all windows, and see if it belongs to my application
by verifying the parent window of those windows is us?)
>1) Is there a way to get the top level window in an application, that is NOT
>( GetForegroundWindow() is system wide. I want something similar...Shapes, Cells and Z-Order
I'm trying to pretty up a workbook by adding some shapes and I'm curious if
there was a way to cause a cell (and it's contents and formatting) to appear
above a shape. More specifically I'd like to add a sort of frame around a
range with a color fill gradient and shadows but have the cells in the
location appear above it. I'v fooled around with send to back on the shapes
and different combinations of transparency and pattern settings but the
shape always appears "on top" of the cells. Just curious if there was a way
to do this?
You can't put any...