Re: coloring controls

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 07/14/04


Date: Wed, 14 Jul 2004 11:20:22 -0400

Jeevan wrote:
> how do i get the buttons on my control colored.Is there a way.I also want
> to now if i can run small gif files on the dialog.If possible provide me
> with some code.Thanks in advance .Bye

I don't have any code, but look into button styles, namely BS_BITMAP
value. If you set it, you can (and will have to if you want to see
anything) set a bitmap for that button. The bitmap could be created
from a file, a gif file is probably one of those that can be used.

Also, look at BS_OWNERDRAW style bit, which allows you to do anything
you want when time comes to draw the button. It's a bit more involved
than BS_BITMAP, but gives you more freedom.

See the documentation or your favourite book on Windows programming.

Victor


Quantcast