|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 jenrya 于 2012-4-13 00:04 编辑
#define WS_EX_LAYERED 0x00080000
#define LWA_COLORKEY 0x00000001
#define LWA_ALPHA 0x00000002
typedef void (*szcktm)(HWND,COLORREF,BYTE,DWORD);
HWND hwnd = FindWindow(NULL, "无标题 - 记事本");
HMODULE hModule = :: LoadLibrary("user32.dll");
if(hModule != NULL)
{
szcktm setm = (szcktm)::GetProcAddress(hModule, "SetLayeredWindowAttributes");
if(setm != NULL)
{
//LONG rtn;
//rtn = ::GetWindowLong(hwnd, -20);
//rtn = rtn | WS_EX_LAYERED;
::SetWindowLong(hwnd, -20, WS_EX_LAYERED);
setm(hwnd, RGB(50,50,50), 100, LWA_ALPHA);
}
::FreeLibrary(hModule);
}
------------------------------------------------------------------------------------------------------------------------------------------------
窗口设置透明成功了但出致命错误:
The value of ESP was not properly saved across a function call.
This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
(Press Retry to debug the application)
-------------------------------------------------------------------------------------------------------------------------------------------------
求:哪出了问题? 或怎么更新VC6才有这个函数, 边问边找!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|