Detect User User Color Depth bits

From NSIS Wiki

Author: Joel (talk, contrib)


[edit] The Script

;Detect Color depth bit of the user
 
OutFile "ColorDepth.exe"
Name "Detect User Color Depth bits"
Caption "Detect User User Color Depth bits"
XPStyle "on"
 
Function ".onInit"
System::Call 'user32::GetWindowDC(i $HWNDPARENT) i .r0'
System::Call 'gdi32::GetDeviceCaps(i $0, i 12) i .r1'
MessageBox MB_OK|MB_ICONINFORMATION "Color Depth: $1 bit."
Quit
FunctionEnd
 
Section "-boo"
;
SectionEnd
donate
ads