Click here to Skip to main content
15,902,886 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change the push button colour using owner draw , i dono the codings please help me,,

thank you

1 solution

It's all here[^].
Share this answer
Sergey Alexandrovich Kryukov 20-Mar-11 22:57pm    
Correct, my 5. Another way if CWnd::OnDrawItem -- without sub-classing; sub-classing a button is better, I would say.
Richard MacCutchan 21-Mar-11 5:01am    
And it's probably what I would go for, but the OP just asked about owner drawing. I think my point really was to demonstrate (once again!) how easy it is to find the documentation rather than posting what is essentially a Google query in these forums.
Sergey Alexandrovich Kryukov 21-Mar-11 5:13am    
You're absolutely right -- about finding of documentation. As to owner draw -- CWnd::OnDrawItem is exactly the same thing as control owner draw, only for all controls (marked with appropriate flags) for all controls in the windows at the same time without sub-classing. This is like code injections.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900