If I need to detect width of the screen in pixels I use
invoke GetSystemMetrics,SM_CXSCREEN
How can I detect resolution of current video mode (256
colors or 16 bit or 24 bit etc.?
Thanks to all,
Mike
invoke GetSystemMetrics,SM_CXSCREEN
How can I detect resolution of current video mode (256
colors or 16 bit or 24 bit etc.?
Thanks to all,
Mike
Pseudo code:
GetDC, 0 ; desktop dc
mov hDC, eax
GetDeviceCaps, hDC, PLANES
mov nPlanes, eax
GetDeviceCaps, hDC, BITSPIXEL
mov nBpP, eax
ReleaseDC, 0, hDC
mov colordepth, nPlanes * nBpP
GetDC, 0 ; desktop dc
mov hDC, eax
GetDeviceCaps, hDC, PLANES
mov nPlanes, eax
GetDeviceCaps, hDC, BITSPIXEL
mov nBpP, eax
ReleaseDC, 0, hDC
mov colordepth, nPlanes * nBpP