创建一个透明的窗口 [英] creating a transparent window

查看:573
本文介绍了创建一个透明的窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要创建一个将创建透明窗口的应用程序.
感谢您的帮助

Want to create an application which will create a transparent window.
Thanks for help

推荐答案

有两个步骤:

There are two steps:

// Set WS_EX_LAYERED on this window 
SetWindowLong(hwnd, GWL_EXSTYLE,
        GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
// Make this window 70% alpha
SetLayeredWindowAttributes(hwnd, 0, (255 * 70) / 100, LWA_ALPHA);



这只是一个变量hwnd-窗口的句柄:)

分层的窗口 [



Here is only one variable hwnd - handle of a window :)

Layered windows[^]


这篇关于创建一个透明的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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