http://m.blog.csdn.net/blog/shufac/24932279
http://blog.sina.com.cn/s/blog_455245fc01000a42.html
void CMFCApplication4Dlg::OnBnClickedButton1()
{
// TODO: 在此加入控件通知处理程序代码
//定义AnimateWindow的函数指针
//測试一
// typedef UINT (CALLBACK* LPFUN)(HWND hwnd, DWORD dwTime,DWORD dwFlags);
// LPFUN pp;
// HINSTANCE hInst=::LoadLibrary(_T("user32.dll"));
// if(hInst)
// {
// pp = (LPFUN)::GetProcAddress(hInst, "AnimateWindow" );
// pp(GetSafeHwnd(), 1000,AW_HIDE|AW_BLEND); // 红色的是动画类型
// //pp(GetSafeHwnd(), 1000,AW_BLEND|AW_SLIDE|AW_HIDE); // 红色的是动画类型
//
// ::FreeLibrary(hInst ); //绿色的是时间
// } //下同
//CDialog::OnClose();
//測试二
DWORD dwStyle = AW_CENTER;
HINSTANCE hInst = LoadLibrary(_T("User32.DLL"));
typedef BOOL(WINAPI MYFUNC(HWND,DWORD,DWORD));
MYFUNC* AnimateWindow;
AnimateWindow=(MYFUNC *)::GetProcAddress(hInst,"AnimateWindow");
AnimateWindow(this->GetSafeHwnd(),2000,AW_HIDE|AW_BLEND);
FreeLibrary(hInst);
CDialog::OnClose();
}
http://blog.sina.com.cn/s/blog_455245fc01000a42.html
AnimalWindow使用,实现界面动态消失
void CMFCApplication4Dlg::OnBnClickedButton1()
{
// TODO: 在此加入控件通知处理程序代码
//定义AnimateWindow的函数指针
//測试一
// typedef UINT (CALLBACK* LPFUN)(HWND hwnd, DWORD dwTime,DWORD dwFlags);
// LPFUN pp;
// HINSTANCE hInst=::LoadLibrary(_T("user32.dll"));
// if(hInst)
// {
// pp = (LPFUN)::GetProcAddress(hInst, "AnimateWindow" );
// pp(GetSafeHwnd(), 1000,AW_HIDE|AW_BLEND); // 红色的是动画类型
// //pp(GetSafeHwnd(), 1000,AW_BLEND|AW_SLIDE|AW_HIDE); // 红色的是动画类型
//
// ::FreeLibrary(hInst ); //绿色的是时间
// } //下同
//CDialog::OnClose();
//測试二
DWORD dwStyle = AW_CENTER;
HINSTANCE hInst = LoadLibrary(_T("User32.DLL"));
typedef BOOL(WINAPI MYFUNC(HWND,DWORD,DWORD));
MYFUNC* AnimateWindow;
AnimateWindow=(MYFUNC *)::GetProcAddress(hInst,"AnimateWindow");
AnimateWindow(this->GetSafeHwnd(),2000,AW_HIDE|AW_BLEND);
FreeLibrary(hInst);
CDialog::OnClose();
}