Advertisement Jump to content


This topic is now archived and is closed to further replies.


Fonts and Buttons

This topic is 5847 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

Hi there, Got a problem with a button. I cannot change it''s font. Just to make sure that i didn''t make any mistakes creating I used the examples from the MSDN (Creating the button, creating the font). Since there was no visible change of the text displayed on my button I tried to get an idea how the current font of the button looks like and called GetFont(), which, to my surprise, returns a zero pointer. How do I set the font of a button ? Thanks for any comment. Lorenz

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
where, in code, did you set the button''s font? how did you set the button''s font? did you use the WM_SETFONT msg to set the button''s font? did you set the redraw flag in the WM_SETFONT call so that the button would redraw itself using the new font? did you make sure that the font used has a lifetime that is the same as or longer than the button''s lifetime? did you verify that the handle returned from the CreateFont call was non-NULL?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!