开发者

With an ActiveX control in an browser window container, how do I detect when user changes tab away from activex control

I have an ActiveX control that gets placed in an IE browser container. The control creates another dialog window that has WS_POPUP and WS_LAYERED properties enabled in order to be able to use SetLayeredWindowAttributes(...) function to accomplish color keyed transparency and alpha blending on top of the control.

Because the WS_LA开发者_StackOverflowYERED property cannot be used in conjunction with WS_CHILD property the management of the window visibility is not automatic. I need to be able to detect when the ActiveX control is no longer visible (i.e. because the browser tab was changed or minimized) so I can change the visibility of the overlay window.

I have tried to use some of the existing window messages (WM_) to determine this change but have not seen them fire when the IE browser tab is changed. Does anyone know the best way to capture when these visibility changes are happening?


If you aren't seeing a WM_SHOWWINDOW notification, then your window is being covered over rather than hidden. There is no Windows message that will tell you when your ActiveX control has been covered over. You need to look for notifications from the browser.

Or come up with a solution that doesn't use a WS_POPUP window. Perhaps you could use AlphaBlend to do your own color keying rather than relying on the implied AlphaBlend behavior of SetLayeredWindowAttributes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜