CDS_UPDATEREGISTRY在MSDN中的定义为: The graphics mode for the current screen will be changed dynamically and the graphics mode will be updated in the registry. The mode information is stored in the USER profile.
if (ChangeDisplaySettings(lpDevMode, CDS_UPDATEREGISTRY) == DISP_CHANGE_SUCCESSFUL)
改成ChangeDisplaySettings(CurrentSetting,CDS_UPDATEREGISTRY)
CDS_UPDATEREGISTRY在MSDN中的定义为:
The graphics mode for the current screen will be changed dynamically and the graphics mode will be updated in the registry. The mode information is stored in the USER profile.