I assume you mean the default Windows control background colour.
This a platform specific solution that should work on most Windows OSs:
SuperStrict
Import MaxGUI.Win32MaxGUIEx
Extern "win32"
Function GetSysColor%( pParam% )
EndExtern
?Win32
Local tmpColour% = GetSysColor( COLOR_BTNFACE )
Local tmpRed% = (tmpColour & $FF), tmpGreen% = ((tmpColour & $FF00) Shr 8), tmpBlue% = ((tmpColour & $FF0000) Shr 16)
Print "Red: " + tmpRed + " Green: " + tmpGreen + " Blue: " + tmpBlue
? You need to use the GetSysColor() Windows API function (with the constant COLOR_BTNFACE which corresponds to the colour you want), and then convert the returned value into separate red, green and blue components.
Here is the MSDN link with a table of the other available colours you can retrieve:
http://msdn2.microsoft.com/en-us/library/ms724371(VS.85).aspx
|