Hi
I'm new to API calls, so please bear with me if this is a stupid question...
I'm trying to get the screen resolution of the Windows desktop using gdi32.dll - function "GetDeviceCaps". (I've successfully used "GetSystemMetrics" in user32.dll, but that returns the current window size - not the desktop).
In a VB example on the net, I've come across a call which uses the parameters:
XResolution = GetDeviceCaps(hDC, HORZRES)
I'm not using VB, but I am assuming that HORZRES is a subfunction and hDC is the handle of the window I'm getting the resolution of.
If not, would someone be good enough to tell me what 'hDC' is and if I am correct, how to get the correct value to use for hDC with regards to the Windows desktop.
Thanks in advance...
BC
I'm new to API calls, so please bear with me if this is a stupid question...
I'm trying to get the screen resolution of the Windows desktop using gdi32.dll - function "GetDeviceCaps". (I've successfully used "GetSystemMetrics" in user32.dll, but that returns the current window size - not the desktop).
In a VB example on the net, I've come across a call which uses the parameters:
XResolution = GetDeviceCaps(hDC, HORZRES)
I'm not using VB, but I am assuming that HORZRES is a subfunction and hDC is the handle of the window I'm getting the resolution of.
If not, would someone be good enough to tell me what 'hDC' is and if I am correct, how to get the correct value to use for hDC with regards to the Windows desktop.
Thanks in advance...
BC