Find Number and resolution to all monitors

后端 未结 3 1125
长情又很酷
长情又很酷 2020-12-08 07:47

How would one poll windows to see what monitors are attached and what resolution they are running at?

3条回答
  •  隐瞒了意图╮
    2020-12-08 08:07

    http://msdn.microsoft.com/en-us/magazine/cc301462.aspx

    GetSystemMetrics is a handy function you can use to get all sorts of global dimensions, like the size of an icon or height of a window caption. In Windows 2000, there are new parameters like SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN to get the virtual size of the screen for multiple monitor systems. Windows newbies—and pros, too—should check out the documentation for GetSystemMetrics to see all the different system metrics (dimensions) you can get. See the Platform SDK for the latest at http://msdn.microsoft.com/library/en-us/sysinfo/sysinfo_8fjn.asp. GetSystemMetrics is a handy function you frequently need to use, and new stuff appears with every version of Windows.

提交回复
热议问题