码迷,mamicode.com
首页 > 其他好文 > 详细

透明窗口

时间:2014-05-31 13:09:12      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   a   ext   


在OnInitDialog()加入:
//加入WS_EX_LAYERED扩展属性
SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,
GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
HINSTANCE hInst = LoadLibrary("User32.DLL");
if(hInst)
{
typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);
MYFUNC fun = NULL;
//取得SetLayeredWindowAttributes函数指针
fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");
if(fun)fun(this->GetSafeHwnd(),0,128,2);
FreeLibrary(hInst);
}

透明窗口,布布扣,bubuko.com

透明窗口

标签:c   style   class   blog   a   ext   

原文地址:http://www.cnblogs.com/haldir/p/3761224.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!