简体   繁体   English

将子窗口添加到分层窗口

[英]Add a child window to a Layered window

Here is the problem. 这是问题所在。 I have a layered window which represents the main GUI of my application. 我有一个分层的窗口,代表我的应用程序的主GUI。 I created another window that hosts an IWebBrowser2 ActiveX control to show a part of a website. 我创建了另一个窗口,该窗口承载一个IWebBrowser2 ActiveX控件以显示网站的一部分。 I am trying to add the hwnd of the browser window to the main window. 我正在尝试将浏览器窗口的hwnd添加到主窗口。 If the parent window is a normal window everything is fine but when i try to create it as a WS_EX_LAYERED window, the added browser window does not appear anymore. 如果父窗口是普通窗口,则一切都很好,但是当我尝试将其创建为WS_EX_LAYERED窗口时,添加的浏览器窗口将不再显示。 How can i signal the main window to draw the other window too? 我如何发信号通知主窗口也绘制另一个窗口?

Children windows inherit the transparency settings from parent window. 子窗口从父窗口继承透明度设置。 You could not have transparent parent with opaque children. 您不能有不透明子代的透明父代。 The possible workaround is to create non-rectangular window region for parent window - with hole for opaque window (But it will be not child window in this case). 可能的解决方法是为父窗口创建非矩形窗口区域-为不透明窗口创建孔(但在这种情况下,它不是子窗口)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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