ChangeDisplaySettingsEx () 具体内容请看帮助。 This function changes the settings of the specified display device to the specified graphics mode. LONG ChangeDisplaySettingsEx( LPCTSTR lpszDeviceName, LPDEVMODE lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam ); When you change the display mode dynamically, the OS sends theWM_SETTINGCHANGE message to all running applications. To query for the current orientation, call ChangeDisplaySettingsEx with lpDevMode set to DM_DISPLAYORIENTATION and dwflags set to CDS_TEST. The current orientation will be returned in lpDevMode. 关键参数 - dmDisplayOrientation 有以下取值: DMDO_0 不旋转 DMDO_90 旋转90度 DMDO_180 旋转180度 DMDO_270 旋转270度