   [Win32] Obtain DRAWITEMSTRUCT assoc. with a Button
  HelloI am trying to change the colour of a button when an event occurs(when I open a colour dialog & select a new colour).So I need to send a WM_DRAWITEM message to my WNDPROC using this function:SendMessage(hwnd, WM_DRAWITEM, (WPARAM) buttonID, (LPARAM) (??buttons DRAWITEMSTRUCT) ); So I need to send a DRAWITEMSTRUCT associated with the button as the lParam parameter for the above function.My Problem:I dont know how to get the DRAWITEMSTRUCT associated with the button control? Can you help me find out how I can send a DRAWITEMSTRUCT as the lParam parameter? I need to get access the DRAWITEMSTRUCT associated with my button.If you dont know what the DRAWITEMSTRUCT is, it contains all the information about the button, like its text & bk colour, its style etc.http://msdn.microsoft.com/en-us/library/bb775802(VS.85).aspx 
  Don't manually send a WM_DRAWITEM message. Have your button have the BS_OWNERDRAW style and simply call InvalidateRect on the button.If you do insist on using WM_DRAWITEM like that you just create a local DRAWITEMSTRUCT instance and fill it according to your needs. Call SendMessage on it with the pointer in LPARAM and you're done:{  DRAWITEMSTRUCT    dis;  // fill the struct  SendMessage( hwndButton, WM_DRAWITEM, 0, (LPARAM)&dis );};  WM_DRAWITEM is only for buttons that use the BS_OWNERDRAW style. You get that message through the button's parent window's procedure. Buttons also process WM_PAINT messages. I'm not sure if it will work, but you could subclass the button and handle the WM_PAINT message yourself, but using WM_DRAWITEM is easier.   