Fries
Fries

Reputation: 359

How to change the font of static text control (winapi)?

I'm currently using winapi with C++ to make a program. When I was using the rc editor in Visual Stdio 2015 (the control is on a dialog), I found that there's no font changer for static text control. So, How to change the font of static text control (winapi)?

Thank You

Upvotes: 1

Views: 3917

Answers (1)

Paul
Paul

Reputation: 6851

It's not possible to change the font of a static control by modifying the resource file. You can only change the font of the whole dialog.

You can change the font of a static control in runtime, by sending the WM_SETFONT message. A font can be created by the CreateFontIndirect function, for example.

Upvotes: 8

Related Questions