How to Get System Colors ?

BlitzPlus Forums/BlitzPlus Programming/How to Get System Colors ?

cyberseth(Posted 2003) [#1]
The title says it all. I would like to be able to retrieve system colors, like for example the background of a window, so I can fill a canvas with the same colour and make it blend into the window. As different systems can have different windows schemes and styles, this is very important!


darklordz(Posted 2003) [#2]
Windows API...Why not try and look it up...


Shagwana(Posted 2003) [#3]
Create or add to your existing 'User32.decls' file in your userlib folder.
.lib "User32.dll"
GetSysColor%(Color%) :"GetSysColor"   ;Use to get system colors, etc


Then, in blitz code;

Const WIN32_SYSCOLOR_3DFACE   = 15

rgb=GetSysColor(WIN32_SYSCOLOR_3DFACE)


Should get you the bg color of a window


cyberseth(Posted 2003) [#4]
I had a look in the API, this one seemed to elude me!