Connecting Tech Pros Worldwide Forums | Help | Site Map

How to change Text Colour?

Newbie
 
Join Date: Oct 2008
Posts: 14
#1: Dec 10 '08
Hi All,
I have created a dialog based application in vc++ which includes some buttons.I want to give different colours for their borders and also for the text on them.Can u pls provide solution for my problem?I have used CTLCOLOR_BTN and OnCtlColor to change the colour but this will change the whole button color i want to change only text present on the button.
Thank u .

Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,202
#2: Dec 10 '08

re: How to change Text Colour?


If using CTLCOLOR_BTN and OnCtlColor is not doing what you want then you will have to opt for an Owner Drawn button, look up BS_OWNERDRAW and WM_DRAWITEM
Reply