Trying Dexpot for first time. I like it very much, but one problem is giving me a big headache. About a million years ago, I wrote a Win32 app that resizes the top-of-z-order window with specific x,y,h,w values. It does this by calling SetWindowPos. When I use Dexpot Desktop Manager (DDM), it seems to intercept this action and the DDM window itself gets resized. It is as though DDM is the top-of-z-order window, even though my intented resize target app window clearly has focus.
I can get around this by using Dexpot desktop icons in systray, but I would rather use Desktop Manager. Any idea how I can get DDM to pass-thru the messages to my intended app window?
Using: Win XPsp2, Dexpot 1.5.7r1394
Thanks, SteveD
Desktop Manager Z Order
Re: Desktop Manager Z Order
Forgot to mention - I will gladly send to you my little Win32 app (with source code) that does this resize call.
Re: Desktop Manager Z Order

How do you determine which window to resize? If you want the window that has the focus, you should probably use GetForegroundWindow.
Re: Desktop Manager Z Order
It's really quite the hack. My utility runs in systray, and when activated, it (systray) steals focus. So, to find the app window that needs resizing, I re-acquire the desktop stack, and walk through the window z-order until I find the most recent one that has a name, is visible, etc. The handle that is returned is the one that I resize (see code below). It works quite nicely.
It is no doubt important for Dexpot Desktop Manager to do whatever it's doing. Obviously, controlling multiple desktops requires some amount of control over the z-order. That's cool. I was just hoping that I wouldn't have to revisit my 12 year old utility. Oh well - if it's that important to me, maybe I will...
Thank you very much for your reply Patrick! And just so you know, Dexpot is pretty nice - I really think it will replace my use of PerfectScreens.
HWND GetPriorTopWindow()
{
HWND hwnd;
char buff[2];
hwnd = GetDesktopWindow();
hwnd = GetTopWindow(hwnd);
while ((GetWindowText(hwnd, buff, 2) == 0) || (GetParent(hwnd) != NULL) || !IsWindowVisible(hwnd))
hwnd = GetNextWindow(hwnd, GW_HWNDNEXT);
OutputDebugString(GetWindowInfo(g_hprevwnd, g_buff, sizeof(g_buff)));
return hwnd;
}
It is no doubt important for Dexpot Desktop Manager to do whatever it's doing. Obviously, controlling multiple desktops requires some amount of control over the z-order. That's cool. I was just hoping that I wouldn't have to revisit my 12 year old utility. Oh well - if it's that important to me, maybe I will...
Thank you very much for your reply Patrick! And just so you know, Dexpot is pretty nice - I really think it will replace my use of PerfectScreens.
HWND GetPriorTopWindow()
{
HWND hwnd;
char buff[2];
hwnd = GetDesktopWindow();
hwnd = GetTopWindow(hwnd);
while ((GetWindowText(hwnd, buff, 2) == 0) || (GetParent(hwnd) != NULL) || !IsWindowVisible(hwnd))
hwnd = GetNextWindow(hwnd, GW_HWNDNEXT);
OutputDebugString(GetWindowInfo(g_hprevwnd, g_buff, sizeof(g_buff)));
return hwnd;
}
Who is online
Users browsing this forum: No registered users and 2 guests