Bringing only 1 app window to foreground

Bringing only 1 app window to foreground

Post by VGlt » Tue, 28 Sep 2004 01:33:04


I have a "MDI" app with several WS_OVERLAPPEDWINDOW child windows. When some
other app is in the foreground, I would like a mouse click on one of my
windows to bring only that window to the top of the z-order, i.e., leaving
the rest of my windows behind the other app. Any ideas how to do that?
 
 
 

Bringing only 1 app window to foreground

Post by VGlt » Tue, 05 Oct 2004 01:41:02


Thanks! This does exactly what I need, and saved me a bunch of hacking
around.

 
 
 

Bringing only 1 app window to foreground

Post by VGlt » Tue, 05 Oct 2004 03:11:01

Spoke too soon. That does do exactly what I asked for, but I realized what I
really need at the moment is to dynamically switch this behavior on and off
for a certain window. I tried CWnd::SetOwner(), but that seems to have no
effect.

I do generally like the independent Window activation/ordering you get with
this approach. But, I'm afraid it would be too large a change for my
existing users, so wanted to introduce it in limited setting where it is
really needed.