用什么API可以得到显示器的名字就像"Plus And Play Monitor"?
我的方法是:
先用EnumDisplayMonitors枚举出所有设备,得到的每个显示器的句柄再在它的回调FUNCTION中用GetMonitorInfo来获取每一个显示器的信息,但从返回的MONITORINFOEX结构中得到的szDevice是一些\\...\**的字符串,这好像是显示器的名字而不是显示器的描述字符串.
请教大侠们怎么样才能得到像"Plus And Play Monitor"的描述字符串呢?谢谢
我的方法是:
先用EnumDisplayMonitors枚举出所有设备,得到的每个显示器的句柄再在它的回调FUNCTION中用GetMonitorInfo来获取每一个显示器的信息,但从返回的MONITORINFOEX结构中得到的szDevice是一些\\...\**的字符串,这好像是显示器的名字而不是显示器的描述字符串.
请教大侠们怎么样才能得到像"Plus And Play Monitor"的描述字符串呢?谢谢
"MaxResolution"="1600,1200"
"DPMS"="1"
"InfPath"="monitor.inf"
"InfSection"="VESADDC.Install"
"ProviderName"="Microsoft"
"DriverDateData"=hex:00,40,6c,e7,9f,0b,bf,01
"DriverDate"="10-1-1999"
"MatchingDeviceId"="*pnp09ff"
"DriverDesc"="即插即用监视器"[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96E-E325-11CE-BFC1-08002BE10318}\0000\MODES][HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96E-E325-11CE-BFC1-08002BE10318}\0000\MODES\1600,1200]
@=""
HMONITOR hMonitor, // handle to display monitor
LPMONITORINFO lpmi // pointer to display monitor information
);
Parameters
hmonitor
Handle to the display monitor of interest.
lpmi
Pointer to a MONITORINFO structure or a MONITORINFOEX structure. The function stores information about the specified display monitor in this structure.
You must set the cbSize member of the structure to sizeof(MONITORINFO) or sizeof(MONITORINFOEX) before calling the GetMonitorInfo function. Doing so lets the function determine the type of structure you are passing to it. The MONITORINFOEX structure is a superset of the MONITORINFO structure. It has one additional member: a string member, to contain a name for the display monitor. Most applications have no use for a display monitor name, and so can save some bytes by using a MONITORINFO structure
不过还得谢谢大家的关注.