- LPDEVMODE pMode = new DEVMODE;//开空间
- DWORD dwBitsPerPel=0;//每象素所使用的显存位数(Bits)
- DWORD dwPelsWidth=0;//水平分辨率(点数)
- DWORD dwPelsHeight=0;//垂直分辨率(点数)
- DWORD dwDisplayFrequency=0;//显示刷新率,以赫兹为单位
- EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,pMode);//获得当前设备的显示模式
- dwBitsPerPel=pMode->dmBitsPerPel;
- dwPelsWidth=pMode->dmPelsWidth;
- dwPelsHeight=pMode->dmPelsHeight;
- dwDisplayFrequency=pMode->dmDisplayFrequency;
- m_nBitsPerPel=dwBitsPerPel;
- m_nPelsWidth=dwPelsWidth;
- m_nPelsHeight=dwPelsHeight;
- m_nDisplayFrequency=dwDisplayFrequency;
- UpdateData(FALSE);//更新对话框数据
- delete pMode;//释放空间