How to Get System Colors ?

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

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!

Windows API...Why not try and look it up...

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

I had a look in the API, this one seemed to elude me!