SetLayeredWindowAttributes和WS_CHILD [英] SetLayeredWindowAttributes and WS_CHILD

查看:142
本文介绍了SetLayeredWindowAttributes和WS_CHILD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为使用WS_CHILD样式创建的窗口获得与SetLayeredWindowAttributes相同的效果?有没有解决方法?从MSDN:要创建分层窗口,请在调用CreateWindowEx函数时指定WS_EX_LAYERED扩展窗口样式,或在创建窗口后调用SetWindowLong函数来设置WS_EX_LAYERED。在CreateWindowEx调用之后,在为此窗口调用SetLayeredWindowAttributes或UpdateLayeredWindow函数之前,分层窗口将不可见。请注意,WS_EX_LAYERED不能用于子窗口。

How can I get the same effect as SetLayeredWindowAttributes for windows created with WS_CHILD style? Is there any workaround? From MSDN: To create a layered window, specify the WS_EX_LAYERED extended window style when calling the CreateWindowEx function, or call the SetWindowLong function to set WS_EX_LAYERED after the window has been created. After the CreateWindowEx call, the layered window will not become visible until the SetLayeredWindowAttributes or UpdateLayeredWindow function has been called for this window. Note that WS_EX_LAYERED cannot be used for child windows.

推荐答案

对我来说,它看起来很干净。文档说你不能这样做。如果没有WPF,我没有看到任何可能的解决方法。
It seems pretty cut and dry to me. The docs say you can't do it. I don't see any possible workaround without going to WPF.


这篇关于SetLayeredWindowAttributes和WS_CHILD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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