如何让VC的窗体变为透明
2007-04-27 09:13
369 查看
//=======================================
SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,
GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
HINSTANCE hInst = LoadLibrary("User32.DLL"); //显式加载DLL
if(hInst)
{
typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);
MYFUNC fun = NULL;
fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");//取得SetLayeredWindowAttributes函数指针
if(fun)fun(this->GetSafeHwnd(),0,100,2);
FreeLibrary(hInst);
}
//=========================================
SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,
GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
HINSTANCE hInst = LoadLibrary("User32.DLL"); //显式加载DLL
if(hInst)
{
typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);
MYFUNC fun = NULL;
fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");//取得SetLayeredWindowAttributes函数指针
if(fun)fun(this->GetSafeHwnd(),0,100,2);
FreeLibrary(hInst);
}
//=========================================
相关文章推荐
- 如何让VC的窗体变为透明
- vc中透明窗体的实现!!
- VC:透明窗体+接收鼠标事件
- Photoshop制作Android UI: 如何将图片背景变为透明
- 教你如何用Qt做透明的窗体,setMask,Qt,Opacity
- vc如何自定义消息与在线程中向主窗体控件发送数据
- 教你如何用Qt做透明的窗体
- [翻译]在Windows窗体中如何使用透明图片和标签
- VC界面窗口:透明窗体地又一完成[库库中文网]-系统编程教程 QQGB.com
- VC中实现透明窗体--SetLayeredWindowAttributes
- c#,VC++ 在WinForm开发中如何实现控件随窗体大小的改变而自动适应其改变
- 教你如何用Qt做透明的窗体,setMask,Qt,Opacity
- 使VC Dialog窗体拥有透明效果的API(转)
- PNG透明窗体全攻略(控件不透明)vc++程序指导
- VC如何实现透明窗口
- 如何使用Photoshop(PS)将图片的底色变为透明
- Qt实现当鼠标移动到窗体上,窗体由半透明变为不透明
- mfc中如何实现窗体半透明 但是控件不透明
- VC++ 如何使窗体最大化或是最小化
- VC对话框如何检测鼠标离开窗体的事件?(转载自CSDN) 2010-12-2 12:06