解决方案 »
- 关于MFC随机生成符号问题
- 有谁知道<windows程序设计>作者王艳平的blog?
- 在VC6.0中用DAO连接Access数据库,如何在一个有多张表的数据库中对其中某一张表进行操作,通过什么函数来选择对哪张表进行操作!
- CArchive序列化读取时怎样判断文件结束(用>>)
- 如何用程序设置Combo 下拉 高度
- 自己做的的程序,怎样可以和IE一起绑定 [所有相关帖子]
- AlphaBlend中用到双缓冲问题
- 怎样才能在Edit控件中点击右键弹出的菜单,添加自己的菜单项?
- VC++中,编译SDK程序错误!
- zzdaa(忘记我),你应该还在吧?能不能推荐一学习VC++的好书?我借了两本VC++编程的书,讲的都是些最无聊的东西。
- 谁有《VisualC++实践与提高系列丛书-网络编程篇》这本书的电子版?
- 我是新来的,有个vc问题求教!
//加入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);
}//那个128的值就是透明的程度.
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
//加入WS_EX_LAYERED扩展属性
HINSTANCE hInst = LoadLibrary("User32.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,129,2);
FreeLibrary(hInst);
}
return TRUE; // return TRUE unless you set the focus to a control
}
Windows 95/98/Me: Unsupported.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.