Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Retreiving windows colours?

Author
Message
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Oct 2004 05:43 Edited at: 24th Oct 2004 05:44
is theres a dll out there, that can retrieve the colour scheme colours, like an active windows bg colour, if this doesnt make any sence ill take a pic.




Attachments

Login to view attachments
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 24th Oct 2004 05:49
blue gui maybe - not sure though

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2ghz, 512mb, geforce fx5200 128mb, 200gb, xp pro sp2
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Oct 2004 06:11
but that costs money and all i want is to retrieve one rgb value, not a good trade imo :p


empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 24th Oct 2004 08:47
You can use the function GetSysColor (user32.dll)

Play Nice! Play Basic!
The ultimative 2D Game Language.
Version 1.00 available now!
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Oct 2004 09:23 Edited at: 24th Oct 2004 09:55
thanks for the help,

ok 1 last problem



the colour value returned is some big number, but how do i get it to translate into a colour value dbp understands?


empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 24th Oct 2004 09:51 Edited at: 24th Oct 2004 09:53


You can find a constant list of possible indices here:
Edit: I mean here:
http://www.ilook.fsnet.co.uk/vb/vbsyscol.htm

Play Nice! Play Basic!
The ultimative 2D Game Language.
Version 1.00 available now!
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Oct 2004 10:02
ok i looked at it, and i dont get it

1st it makes no senc
2nd i dont know c, or whichever language thats in


griffirr
19
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 24th Oct 2004 10:45
Hello,
Here is a color tool I made (its free) that give you a nice (R,G,B) string of any color just for this purpose. Check it out.

http://www.griffithdatasystems.com/products/color2text.htm

P.S. Does VB and HTML as well
Enjoy:
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Oct 2004 10:55
i know howto get a colour for say my pc, as i can just use a colour grabber in psp, but that takes time, and using a 3rd party app takes even more time,

all im really after is to somehow convert this 15 off character long return value into a usable rgb format, on the microsoft site it says it returns an rgb results, but it doesnt look that way at all.

anywho thanks for your help griffirr


the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 25th Oct 2004 02:08 Edited at: 25th Oct 2004 02:14
This gets the colour of the desktop



You need to swap the order around as windows uses orders the colours in rgb while directx uses bgr.

Some values to pass to the GetSysColor function



the default IDE sucks
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 25th Oct 2004 06:40
oo i get it now, thanks a mil


Login to post a reply

Server time is: 2024-04-20 09:54:57
Your offset time is: 2024-04-20 09:54:57