I explain all of this in quite a bit of depth here: Which Font is the default for MFC Dialog Controls? Definitely required reading for any Win32 developer who cares about getting the UI right.
There's no way to set the font for an entire application. The best thing you can do is set the font for a parent window and take advantage of the fact that most controls will inherit their font from their parent. To make extra sure that this works, you can write your own simple SendMessageToChildren
function like MFC offers, which just walks down through the children of a particular parent recursively and sends each of them the WM_SETFONT
message.
But WM_SETFONT
is really your only option here. You can't set a font for an entire class like you can a background brush. Getting this right can be challenging, but I agree that it is a very important to try. The hallmark of an inconsistent UI and an unprofessional application is one that does not use the correct default GUI font. Windows Vista came along and complicated things even further by switching not only the face to Segoe UI, but the default size to 9 point.