可以使用 Undocument API SwitchToThisWindow,Win 95/98/ME/NT/2000/XP 有效:void WINAPI SwitchToThisWindow ( HWND hWnd, // Handle to the window that should be activated BOOL bRestore // Restore the window if it is minimized ); 该函数只能通过 GetProcAddress 获取: typedef void (WINAPI *LPSWITCHTOTHISWINDOW)(HWND, BOOL); LPSWITCHTOTHISWINDOW lpfnSwitchToThisWindow;lpfnSwitchToThisWindow = (LPSWITCHTOTHISWINDOW) GetProcAddress( GetModuleHandle(_T("user32")), _T("SwitchToThisWindow") );
有效:void WINAPI SwitchToThisWindow (
HWND hWnd, // Handle to the window that should be activated
BOOL bRestore // Restore the window if it is minimized
); 该函数只能通过 GetProcAddress 获取:
typedef void (WINAPI *LPSWITCHTOTHISWINDOW)(HWND, BOOL); LPSWITCHTOTHISWINDOW lpfnSwitchToThisWindow;lpfnSwitchToThisWindow = (LPSWITCHTOTHISWINDOW) GetProcAddress( GetModuleHandle(_T("user32")), _T("SwitchToThisWindow") );
-1,-1,-1,-1,SWP_NOMOVE/SWP_NOSIZE);