简体   繁体   中英

Place a window (borderless) on top (z-index) of another window (borderless) such that the one on top trails the one on the bottom

The concept of DWM window manipulation/Window Styles is a bit new to me and I am experimenting with a few new situations. I would be obliged if someone could help point me in the right direction.

Also, how do you keep the 2nd window exactly behind the 1st instead of another window from another application in between them?

在此处输入图片说明

You need process the WM_WINDOWPOSCHANGING message on one of the windows and use SetWindowPos to make sure you keep the z-order. You can either use SetWindowPos to send the window below a message that it should precede the current window, or call it from the second window to the first one with the HWND_TOP argument when the z-order changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM