Jump to content
  • Advertisement
Sign in to follow this  
kingpinzs

question on win32 api common controls

This topic is 4892 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
The parent window can process the WM_CTLCOLORBTN message to change the appearance of buttons.

Share this post


Link to post
Share on other sites
I looked this up in google and msdn and it does not really expalin how I use it . does any one know how to use it.

thanks for the help because now I am on the right track

Share this post


Link to post
Share on other sites
Quote:
Original post by kingpinzs
I looked this up in google and msdn and it does not really expalin how I use it . does any one know how to use it.

thanks for the help because now I am on the right track


From MSDN:



WM_CTLCOLORBTN

hdcButton = (HDC) wParam; // handle to the button display context
hwndButton = (HWND) lParam; // handle to the button

Parameters
hdcButton

Value of wParam. Handle to the display context for the button.
hwndButton

Value of lParam. Handle to the button.
Return Values

If an application processes this message, it must return a handle to a brush.
The system uses the brush to paint the background of the button.



There it is. Use SetTextColor with hdcButton, and return a handle to an HBRUSH with the color for the background. You can use CreateSolidBrush to create your own bg brush... or GetStockObject to use a system brush.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!