Please help support this free site and future BRL projects!

Login or Signup

How to Get System Colors ?

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

cyberseth(Posted 1+ years ago) #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 1+ years ago) #2
Windows API...Why not try and look it up...

Shagwana(Posted 1+ years ago) #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


Should get you the bg color of a window

cyberseth(Posted 1+ years ago) #4
I had a look in the API, this one seemed to elude me!