how to change button color not MFC application 
Author Message
 how to change button color not MFC application

Hi there
this should be easy...I have a winCE application not using MFC. I've a
button and I simply want to change its color.
What should I do ?
I tryed catching the WM_CTLCOLORBTN message and by using lparam and wparam
and SetBkcolor().. but it doesn't work...
Any suggestion ??

what's the meaing of SetSysColor() ??

Thank in advance
Chevassunse



Sun, 01 May 2005 00:12:20 GMT  
 how to change button color not MFC application
Hi,

You cant change the color of push-buttons with the WM_CTLCOLORBTN message.
Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do
not use the returned brush of WM_CTLCOLORBTN. Buttons with these styles are
always drawn with the default system colors. You need to use custom draw
buttons to change button's default appearance.

Cheers
Luki


Quote:
> Hi there
> this should be easy...I have a winCE application not using MFC. I've a
> button and I simply want to change its color.
> What should I do ?
> I tryed catching the WM_CTLCOLORBTN message and by using lparam and wparam
> and SetBkcolor().. but it doesn't work...
> Any suggestion ??

> what's the meaing of SetSysColor() ??

> Thank in advance
> Chevassunse



Sun, 01 May 2005 13:37:22 GMT  
 how to change button color not MFC application
Thank you for your help...

I'm sorry but that wasn't enough for my knowledge.....
I had a look to msdn but it sucks.....

Cheers
Chevassunse



Quote:
> Hi,

> You cant change the color of push-buttons with the WM_CTLCOLORBTN message.
> Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do
> not use the returned brush of WM_CTLCOLORBTN. Buttons with these styles
are
> always drawn with the default system colors. You need to use custom draw
> buttons to change button's default appearance.

> Cheers
> Luki



> > Hi there
> > this should be easy...I have a winCE application not using MFC. I've a
> > button and I simply want to change its color.
> > What should I do ?
> > I tryed catching the WM_CTLCOLORBTN message and by using lparam and
wparam
> > and SetBkcolor().. but it doesn't work...
> > Any suggestion ??

> > what's the meaing of SetSysColor() ??

> > Thank in advance
> > Chevassunse



Sun, 01 May 2005 21:35:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Change button color with OnCtlColor() does not work?

2. Changing MFC Button backgorund color?

3. Changing MFC Button backgorund color?

4. How do I change the color of a Push Button color

5. How to change the bk color of the entair application with out effecting the other application

6. Changing the Color of a Button in a Dialog...how

7. changing button color?

8. change text color of Button

9. Changing Buttons Background color...

10. How do I change the color of Dialog box Buttons

11. Change the text color of a button

12. Changing color of button in CPropertyPage

 

 
Powered by phpBB® Forum Software