设置窗口的所有者而不激活/带到前面 [英] Set window's owner without activating/bringing to front

查看:91
本文介绍了设置窗口的所有者而不激活/带到前面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我一直在谷歌搜索如何设置窗口的所有者而不激活/将所有者带到前面并且无法找到它。目前我正在使用winapi:

Hello, I've been googling for days for how to set window's owner without activating/bringing owner to front and couldn't manage to find it. Currently I'm using winapi:

SetWindowLong(hwndWindow, GWL_HWNDPARENT, hwndOwner); // GWL_HWNDPARENT = -8



或内置包装:


or built in wrap:

new WindowInteropHelper(window) { Owner = owner };



两者都适用于设置所有者,但它们将所有者窗口带到前面,当有很多窗口时会导致问题。



感谢您的帮助!


Both works fine for setting owner, but they are bringing owner window to front which causes problems when there are a lot of windows.

Thanks for help!

推荐答案

请参阅:https://msdn.microsoft.com/en-us/library/windows/desktop/ms633541%28v=vs.85%29。 aspx [ ^ ]。



注意备注中有关更改样式和同步UISTATE的要求的注释。 br $>


-SA


这篇关于设置窗口的所有者而不激活/带到前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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