请问有什么办法可以将窗口设为透明窗体? 我在窗体上作图后,可不可以使窗体背景透明,图形和依旧保存?希望各位高手能帮帮小弟。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在WIN2K下用SetSetLayeredWindowAttributes在WIN9X下用AlphaBlendhttp://www.vckbase.com/document/viewdoc.asp?id=333 第一步 定义功能typedef BOOL (FAR PASCAL * FUNC1)( HWND hwnd, // handle to the layered window COLORREF crKey, // specifies the color key BYTE bAlpha, // value for the blend function DWORD dwFlags // action ); 第二步 实现代码 在OnInitDialog中加入下列代码 ..... HMODULE hModule = GetModuleHandle("user32.dll"); FUNC1 SetLayeredWindowAttributes; SetLayeredWindowAttributes = (FUNC1) GetProcAddress (hModule, _T( "SetLayeredWindowAttributes" ) ); // 设置分层扩展标记 SetWindowLong(GetSafeHwnd(), GWL_EXSTYLE, GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE) | 0x80000L); // 70% alpha SetLayeredWindowAttributes(GetSafeHwnd(), 0, (255 * 70) / 100, 0x2); 挖坟挖出个这...我拜服........... 我是菜鸟,一个非常简单的问题.help!!! 求助:各位大哥,为什么这样也可以啊?请帮我看看!谢谢! 关于ActiveX编程的电子书有没有人要?进来看看有没有你想要的? 如何用PostMessage/SendMessage 发送字符串? 用VC填写Oracle中的一个BLOB字段的内容,出现问题。 两台不在一个局域网的计算机怎样共享? VC++初学者,望大家给我提供几本好点的书 快速结贴,一小时内有效 MFC 非模态对话框销毁的问题 求指导 简单的头文件嵌套问题,给一个解决方案 数字转换
在WIN9X下用AlphaBlend
http://www.vckbase.com/document/viewdoc.asp?id=333
typedef BOOL (FAR PASCAL * FUNC1)(
HWND hwnd, // handle to the layered window
COLORREF crKey, // specifies the color key
BYTE bAlpha, // value for the blend function
DWORD dwFlags // action
); 第二步 实现代码 在OnInitDialog中加入下列代码
.....
HMODULE hModule = GetModuleHandle("user32.dll");
FUNC1 SetLayeredWindowAttributes;
SetLayeredWindowAttributes = (FUNC1) GetProcAddress (hModule, _T( "SetLayeredWindowAttributes" ) );
// 设置分层扩展标记
SetWindowLong(GetSafeHwnd(), GWL_EXSTYLE, GetWindowLong(GetSafeHwnd(),
GWL_EXSTYLE) | 0x80000L);
// 70% alpha
SetLayeredWindowAttributes(GetSafeHwnd(), 0, (255 * 70) / 100, 0x2);