将窗口 z-order 设置为高于其他 [英] Set window z-order above other

查看:26
本文介绍了将窗口 z-order 设置为高于其他的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作某种类型的不可见叠加窗口,置于另一个叠加窗口之上.我知道 SetWindowPos() 但它只设置在另一个之下.

I'm making some type of invisible overlay window above another one. I know SetWindowPos() but it only sets below of the other.

我需要一种方法来不断更新窗口位置以保持在正上方,因此如果窗口返回,覆盖层会一起出现.使另一个窗口的这个覆盖子窗口没有帮助,因为另一个窗口有一些渲染内容并且覆盖窗口开始闪烁.

I need a way to keep updating the window position to keep exactly above, so if the window goes back the overlay goes together. Making this overlay child of the other window doesn't help, 'cause the other window has some rendering stuff and the overlay window starts blinking.

推荐答案

使用

SetWindowPos(window, GetNextWindow(below, GW_HWNDPREV), 0, 0, 0, 0,
             SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);

下面的上方放置一个window.

这篇关于将窗口 z-order 设置为高于其他的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆