更改显示设置 [英] Change Display Settings

查看:76
本文介绍了更改显示设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何旋转/调整屏幕分辨率?我的意思是像一个代码示例.我已经知道语法是:

How do you rotate/resize screen resolution? I mean like a code example. I already know the syntax is:

LONG ChangeDisplaySettings(
  __in  DEVMODE *lpDevMode,
  __in  DWORD dwflags
);


但是我不太了解"devmode"部分.我在这里查询了有关此信息: http://msdn. microsoft.com/en-us/library/dd183565(v=VS.85).aspx [


But I don''t really understand the "devmode" part. I''ve looked up information about it here: http://msdn.microsoft.com/en-us/library/dd183565(v=VS.85).aspx[^]

I still don''t get it even after reading over ten times.

Thanks for the help in advance!
TKG

推荐答案

DEVMODE数据结构与当前详细信息有关,包括驱动程序名称,分辨率等.

如果要获取当前diaplay的DEVMODE详细信息,可以使用
EnumDisplaySettings().

http://msdn.microsoft.com/en-us/library/dd162611% 28VS.85%29.aspx [ ^ ]


在ChangeDisplaySettings()中,可以将DEVMODE *用作NULL值,如果lpDevMode为NULL,则当前注册表中的所有值都将用于显示设置.
The DEVMODE data structure is related with the current diaply details including the driver name, resolution etc.

if you want to get the DEVMODE details for the current diaplay, you can use
EnumDisplaySettings().

http://msdn.microsoft.com/en-us/library/dd162611%28VS.85%29.aspx[^]


in ChangeDisplaySettings() you can use DEVMODE* as NULL value, If lpDevMode is NULL, all the values currently in the registry will be used for the display setting.


这篇关于更改显示设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆