Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / General Programming / Win32 Z-Order Fun Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

March 09, 2005, 12:27 AM

I'm trying to catch when a window's z order is about to be changed by intercepting the WM_WINDOWPOSCHANGING notification. lParam contains a WINDOWPOS structure (well, a pointer to one) which has

typedef struct {
HWND hwnd;
HWND hwndInsertAfter;
int x;
int y;
int cx;
int cy;
UINT flags;

The flags are pretty much the same as ShowWindow's ones.

I can't work out how to see if the z-order is changing here, or whether it's position/size.

Basically, I've got a bunch of windows with one parent, and I don't want the order of those windows to change, except if all of them move behind/in front of another app...

I'm looking into the DeferWindowPos API, but had little success as yet.

any ideas guys? help on this would be grouse



March 09, 2005, 04:52 PM

flags is a bitmask of one or more of the possible values stated in the msdn help.
Also hwndInsertAfter is the hwnd of the window that the window receiving the message is to move relative to in the z-order.



March 09, 2005, 10:10 PM

Thanks {FluffysWhole}

Should have probably said that I'm using layered windows, so I'm trying to avoid using anything but UpdateLayeredWindow() for efficiency's sake.

Still, it's looking like SetWindowPos() is gonna be my only option :( Would have been nice to catch the reorder message and kill it, but there are just too many special cases to think about.



This thread contains 3 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.