The only way I have found is with an extarnal DLL:
HDC hdc = GetDC(NULL); // retrieves the device context for the entire screen
if (hdc == NULL)
return GetDeviceCaps(hdc, HORZRES); // return width, in pixels, of the screen.
return GetDeviceCaps(hdc, VERTRES); // return height, in raster lines, of the screen.
For a complete list of constant GetDeviceCaps knows to handle go to: