settingsextns设置向导已停止运行行怎么办

ChangeDisplaySettingsEx
函数的参数怎样获取?该如何处理 - VC/MFC当前位置:& &&&ChangeDisplaySettingsEx
函数的参数怎样获取?该如ChangeDisplaySettingsEx
函数的参数怎样获取?该如何处理&&网友分享于:&&浏览:42次ChangeDisplaySettingsEx
函数的参数怎样获取?????ChangeDisplaySettingsEx &
& 函数的参数怎样获取?????
ChangeDisplaySettingsEx &
& 函数的参数怎样获取?????------解决方案--------------------lpszDeviceName
[in] Pointer to a null-terminated string that specifies the display device whose graphics mode the function will obtain information about. Only display device names as returned by EnumDisplayDevices are valid. See EnumDisplayDevices for further information on the names associated with these display devices.
The lpszDeviceName parameter can be NULL. A NULL value specifies the default display device. The default device can be determined by calling EnumDisplayDevices and checking for the DISPLAY_DEVICE_PRIMARY_DEVICE flag.
12345678910
12345678910
12345678910 上一篇:下一篇:文章评论相关解决方案 12345678910 Copyright & &&版权所有ChangeDisplaySettingsEx Function - C++ Forum
ChangeDisplaySettingsEx Function
& ChangeDisplaySettingsEx Function
Nov 7, 2010 at 6:25pm UTC
Hi Everybody,
As a change of pace I have my code working for valid screen resolutions on the device attached to the system. My problem is that I am shooting for a resolution that is "not supported". When I run my code with a target resolution of "800 x 600" ChangeDisplaySettingsEx returns DISP_CHANGE_BADMODE which of course means that the resolution is not supported I can verify this by changing the width and height arguments in my code to a valid resolution such as "1280 x 1024". But the interesting thing is that I can manually change the resolution through the control panel to the target "800 x 600" and running my code after this, in effect changing the resolution to the current size, returns DISP_CHANGE_SUCCESSFUL. Also changing the resolution manually then resetting it to a valid resolution with my code works and returns DISP_CHANGE_SUCCESSFUL.
I have a feeling that this is because I am missing a command specific to the display drivers that the system is using, but if that is the case I am stuck as I don't know where to look next.
I will post my code upon request but I am only using native Windows XP headers and libs.
Nov 7, 2010 at 7:33pm UTC
So evidently it's not enough to tell the Windows API that I want the resolutions set and EXACTLY what I want it set for but I have to initialize two components of a data strcuture that is only half filled in when I call two seperate functions to populate it :p.
SUMMARY: I wasn't setting the dmPelsWidth or dmPelsHeight flags in the dmFields member of the DEVMODE stucture. There aren't any errors when you forget to do this. The code is verified to be working now.
Last edited on Nov 7, 2010 at 7:34pm UTC
Topic archived. No new replies allowed.ChangeDisplaySettingsEx报错 - VC/MFC当前位置:& &&&ChangeDisplaySettingsEx报错ChangeDisplaySettingsEx报错&&网友分享于:&&浏览:1次ChangeDisplaySettingsEx出错ChangeDisplaySettingsEx("\\\\.\\DISPLAY",&&mode,&NULL,&CDS_TEST,&NULL)返回成功,可是调用
ChangeDisplaySettingsEx("\\\\.\\DISPLAY2",&&mode,&NULL,&0,&NULL)后,整个屏幕就不能操作了,不过鼠标还能动?------解决方案--------------------接了几个显示器吗?
如果只有一个,ChangeDisplaySettingsEx(NULL,&&mode,&NULL,&0,&NULL)就行了------解决方案--------------------看一下返回值!
12345678910
12345678910
12345678910 上一篇:下一篇:文章评论相关解决方案 12345678910 Copyright & &&版权所有}

我要回帖

更多关于 华为桌面已停止运行 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信