Evan Carslake
Evan Carslake

Reputation: 2359

Win32 C++ Resource Dialogs Change Fonts Within

I have a simple question, I couldn't find a thing on google. Basically I want to use multiple fonts within a dialog setup in the resource file.

The font specified being default, but I am wanting to, for example, use a different font on a/ the push button.

I'm not sure if it is possible. Here is how I have it setup.

IDD_MAIN DIALOGEX 0, 0, 165, 250
STYLE DS_MODALFRAME | WS_CAPTION
CAPTION "Options"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Target",IDC_STATIC,7,7,155,35
        PUSHBUTTON      "TRGT1",IDC_TARGET1,15,18,30,14

    PUSHBUTTON      "&Damage Click",IDC_DMGCLICK,7,60,84,14
    EDITTEXT        IDC_INPUTCLICKCOUNT, 7, 80, 84, 14
END

Thanks.

Upvotes: 2

Views: 874

Answers (1)

RichieHindle
RichieHindle

Reputation: 281735

I don't think it's possible to do exactly what you're asking (though I'd love to proved wrong!) but you can always change the font of your button by sending it a WM_SETFONT message from with your WM_INITDIALOG handler.

Upvotes: 1

Related Questions