定义如下宏:
#define AW_CENTER 0x00000010 //动画
#define AW_HIDE 0x00010000 //隐藏
在窗体OnInitDialog函数添加如下代码:
CenterWindow();
DWORD dwStyle = AW_CENTER;
HINSTANCE hInst = LoadLibrary("User32.DLL");
typedef BOOL(WINAPI MYFUNC(HWND,DWORD,DWORD));
MYFUNC* AnimateWindow;
AnimateWindow=(MYFUNC *)::GetProcAddress(hInst,"AnimateWindow");
AnimateWindow(this->m_hWnd,1000,dwStyle);
FreeLibrary(hInst);