Click here to Skip to main content
15,918,050 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Button Color In MFC Pin
002comp24-Apr-12 2:44
002comp24-Apr-12 2:44 
GeneralRe: Button Color In MFC Pin
David Crow24-Apr-12 6:40
David Crow24-Apr-12 6:40 
AnswerRe: Button Color In MFC Pin
jeron124-Apr-12 3:58
jeron124-Apr-12 3:58 
AnswerRe: Button Color In MFC Pin
JohnCz24-Apr-12 4:08
JohnCz24-Apr-12 4:08 
QuestionRe: Button Color In MFC Pin
David Crow24-Apr-12 6:04
David Crow24-Apr-12 6:04 
AnswerRe: Button Color In MFC Pin
JohnCz24-Apr-12 7:42
JohnCz24-Apr-12 7:42 
GeneralRe: Button Color In MFC Pin
enhzflep24-Apr-12 8:13
enhzflep24-Apr-12 8:13 
GeneralRe: Button Color In MFC Pin
JohnCz24-Apr-12 10:55
JohnCz24-Apr-12 10:55 
MSDN states also (below the line you have quoted):

"By default, the DefWindowProc function selects the default system colors for the button. Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do not use the returned brush. Buttons with these styles are always drawn with the default system colors. Drawing push buttons requires several different brushes-face, highlight, and shadow-but the WM_CTLCOLORBTN message allows only one brush to be returned. To provide a custom appearance for push buttons, use an owner-drawn button. For more information, see Creating Owner-Drawn Controls."

This is also incorrect, as you can see from the sample code at the bottom.
Radio and check boxes use static background color. If you change styles to "push like" color of the face will also not change. As you can see parent window is not able to change button’s face color of the pushbutton.

In conclusion, MSDN is incorrect (not the first time).
JohnCz

GeneralRe: Button Color In MFC Pin
002comp24-Apr-12 20:31
002comp24-Apr-12 20:31 
GeneralRe: Button Color In MFC Pin
002comp24-Apr-12 21:34
002comp24-Apr-12 21:34 
GeneralRe: Button Color In MFC Pin
JohnCz25-Apr-12 0:31
JohnCz25-Apr-12 0:31 
GeneralRe: Button Color In MFC Pin
002comp25-Apr-12 3:05
002comp25-Apr-12 3:05 
AnswerRe: Button Color In MFC Pin
JohnCz25-Apr-12 3:47
JohnCz25-Apr-12 3:47 
GeneralRe: Button Color In MFC Pin
002comp25-Apr-12 7:51
002comp25-Apr-12 7:51 
GeneralRe: Button Color In MFC Pin
David Crow25-Apr-12 8:09
David Crow25-Apr-12 8:09 
GeneralRe: Button Color In MFC Pin
JohnCz26-Apr-12 2:28
JohnCz26-Apr-12 2:28 
QuestionRe: Button Color In MFC Pin
David Crow25-Apr-12 2:39
David Crow25-Apr-12 2:39 
AnswerRe: Button Color In MFC Pin
002comp25-Apr-12 7:55
002comp25-Apr-12 7:55 
QuestionReference return vs Pointer return Pin
Aragtey24-Apr-12 0:05
Aragtey24-Apr-12 0:05 
AnswerRe: Reference return vs Pointer return Pin
CPallini24-Apr-12 0:56
mveCPallini24-Apr-12 0:56 
AnswerRe: Reference return vs Pointer return Pin
enhzflep24-Apr-12 1:10
enhzflep24-Apr-12 1:10 
AnswerRe: Reference return vs Pointer return Pin
Aescleal24-Apr-12 1:55
Aescleal24-Apr-12 1:55 
GeneralRe: Reference return vs Pointer return Pin
Aragtey24-Apr-12 5:37
Aragtey24-Apr-12 5:37 
GeneralRe: Reference return vs Pointer return Pin
Aescleal24-Apr-12 6:31
Aescleal24-Apr-12 6:31 
GeneralRe: Reference return vs Pointer return Pin
Aragtey24-Apr-12 6:36
Aragtey24-Apr-12 6:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.