• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Get the the display type

hi,
I need to know (in code) what is the Adapter type name (in "Display properties" under "Display Type").

10x,
Yoav.
0
yoavo
Asked:
yoavo
  • 2
1 Solution
 
shark351Commented:
You can read a registry Entry.

\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Display\0000

Then read a string entry called "DriverDesc"
0
 
shark351Commented:
// Here is the code to read the registry key

HKEY hKey;
unsigned char str[256];
DWORD size  = 256;
CString msg;

::RegOpenKeyEx(HKEY_LOCAL_MACHINE,
            "System\\CurrentControlSet\\Services\\Class\\Display\\0000\\",
            0,
            KEY_READ,
            &hKey);

::RegQueryValueEx(hKey, "DriverDesc", NULL, NULL, str, &size);
::RegCloseKey(hKey);

msg.Format("Display Adapter = %s", str);
AfxMessageBox(msg);
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now