Click to See Complete Forum and Search --> : Api Question
0-_-0
April 20th, 2003, 03:52 AM
Change colors ?!!
Does any one know if it's posible to change the color(s) of another program's control ? To make this short : I want to change names on my AIM buddy list to *blue* , *red* ..ect
Thanx
indiocolifa
April 20th, 2003, 07:44 PM
Im not a winapi expert, but I think it may be possible using Windows Hooks (which is a complex topic, anyway)
teleplayr
April 20th, 2003, 10:20 PM
I would guess you would have to hook the window procedure for the buttons you want and subclass them, so you can trap their WM_ERASEBACKGROUND message to paint it however you like.
Search the forums for windows hooks, there's tons of information. Read up on SetWindowsHookEx();
-Joe
0-_-0
May 4th, 2003, 08:14 PM
...if you wanted to do it every time you load the app, which usually isnt the desired thing to do. But that would be along the lines of an API way yeah.
the_ENIGMA
May 7th, 2003, 09:44 AM
if you want to do this "on-demand" kinda..
you don't need to get bothered about Hooks & Forks.. :)
here is how you do it...
get the control ID of your AIM's buddy list using SPY++... it will be a hex value...
create a Win32 app, and have all the windows enumrated on your desktop (keep only your application running to make it faster..) enumerate childs of them.. and check for the window ID using GetWindowLong... compare the values with the one you already obtained using SPY++...
As soon as you have a match... have the handle of the control...
Once your have handle u would be able to do all the coloring by passing related messages to the control.. (dunno if AIM's buddy list is list box or some thing else...)
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.