文件名称:window_Cwnd
- 所属分类:
- 对话框与窗口
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.49mb
- 下载次数:
- 0次
- 提 供 者:
- zhan****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
实现窗口透明
只需在创建窗口函数中加入
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,200,2)
FreeLibrary(hInst)
}-Just the realization of a transparent window in the creation of a window function to add 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// function pointer SetLayeredWindowAttributes made fun = (MYFUNC) GetProcAddress (hInst, SetLayeredWindowAttributes ) if (fun) fun (this-> GetSafeHwnd (), 0200,2) FreeLibrary (hInst))
只需在创建窗口函数中加入
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,200,2)
FreeLibrary(hInst)
}-Just the realization of a transparent window in the creation of a window function to add 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// function pointer SetLayeredWindowAttributes made fun = (MYFUNC) GetProcAddress (hInst, SetLayeredWindowAttributes ) if (fun) fun (this-> GetSafeHwnd (), 0200,2) FreeLibrary (hInst))
(系统自动生成,下载前可以参看下载内容)
下载文件列表
window_Cwnd
...........\PartTransparent.aps
...........\PartTransparent.clw
...........\PartTransparent.cpp
...........\PartTransparent.dsp
...........\PartTransparent.dsw
...........\PartTransparent.h
...........\PartTransparent.ncb
...........\PartTransparent.opt
...........\PartTransparent.plg
...........\PartTransparent.rc
...........\PartTransparentDlg.cpp
...........\PartTransparentDlg.h
...........\ReadMe.txt
...........\Release
...........\RES
...........\...\PartTransparent.rc2
...........\Resource.h
...........\StdAfx.cpp
...........\StdAfx.h
...........\PartTransparent.aps
...........\PartTransparent.clw
...........\PartTransparent.cpp
...........\PartTransparent.dsp
...........\PartTransparent.dsw
...........\PartTransparent.h
...........\PartTransparent.ncb
...........\PartTransparent.opt
...........\PartTransparent.plg
...........\PartTransparent.rc
...........\PartTransparentDlg.cpp
...........\PartTransparentDlg.h
...........\ReadMe.txt
...........\Release
...........\RES
...........\...\PartTransparent.rc2
...........\Resource.h
...........\StdAfx.cpp
...........\StdAfx.h