1

I want to implement in my code the subclassing and change the color of some push button.

I created the declaration for my push button:

OriginalProc =(WNDPROC) SetWindowLongPtr(hWndButton, GWLP_WNDPROC, (LONG_PTR)EditBoxProc);

Which message is responsible for the painting of button?

Thanks!

Itay Avraham
  • 329
  • 1
  • 3
  • 15
  • http://social.msdn.microsoft.com/Forums/vstudio/en-US/21501c6c-f45e-48bc-8680-cf6d11f349ef/button-background?forum=vcgeneral – i_am_jorf Nov 18 '13 at 22:10
  • @Itay Avraham In my opinion, you should try overriding `WM_PAINT` in your subclass procedure, but there is a better way to change the color of a button. See the answers to [this question](http://stackoverflow.com/questions/18745447/how-can-i-change-the-background-color-of-a-button-winapi-c?rq=1). – AlwaysLearningNewStuff Nov 18 '13 at 23:08
  • Thanks! I want to try implement subclassing. – Itay Avraham Nov 19 '13 at 08:13

0 Answers0