OWL NExt - Knowledge Base

[ Home | Contents | Search | Next | Previous | Up ]

Diferent font in a single OWL Dialog?

Date: 11/29/99
Time: 11:59:47 PM

Q.Who can tell me a trick to use diferent fonts in an single OWL dialog without using standard windows programming?

A.In your dialog constructor, you can define and create each of the fonts that you wish to use for the controls. Then instantiate each control:

    MyEdit = new TEdit( this, IDC_MYEDIT, 255 );

    Then in the SetUpWindow method you can set the font with SetWindowFont:

    MyEdit->SetWindowFont( MyFont, false );

    If you want to use a consistent set of fonts throughout your program, however, a better option might be to make a class derived from TEdit, or whatever controls you use for each font. Then you might have a TBoldEdit, a TLargeStatic, etc. and just use them where appropriate throughout the application.

    - Leo

Last changed: July 14, 2001