Re: setting button text format

From: Crispen, Bob (bob.crispen_at_boeing.com)
Date: 27 February 2003


Subject: Re: setting button text format
Date: Sat, 1 Feb 2003 09:59:54 -0500
From: "Jeff Henkels" <jeff_at_mapson.privatemail.com> Organization: PrivateMail.com
Newsgroups: comp.os.ms-windows.programmer.win32

Don't do it in WM_CTLCOLORBTN; in WM_INITDIALOG or WM_CREATE, create the font object, saving the returned HFONT. Then send a WM_SETFONT message to the button, passing the font you created. Then in your WM_CLOSE or WM_DESTROY handler, destroy the saved font handle.

"Phillip Hauser" <phauser_nospam_at_gmx.de> wrote in message news:b1gg1u$4ng$02$1_at_news.t-online.com... Hello,

I would like to set the font style of a button so that the text is bold. Is it right I need to handle WM_CTLCOLORBTN? What exactly do I need to do? The following fails:

...

case WM_CTLCOLORBTN:

    return CreateFont(...);
...

Bye, Phillip



This archive was generated by hypermail pre-2.1.8 : 26 April 2003 EDT