1

I have created a simple MFC MDI doc/view application with a status bar. The font in the status bar is too small for my taste, so I'd like to make the status bar taller, and use a larger font in the status bar. I cannot figure out how to do either of these.

There is a virtual function CMFCStatusBar::CalcFixedLayout(BOOL, BOOL bHorz) which (I think) uses the status bar's current font to set the bar height, so maybe all that needs to be done is change the font. How can I do this?

64-bit Windows 7, Visual Studio 2010, native C++

Woody20
  • 791
  • 11
  • 30
  • Every window has a font assigned to it, all you have to do is call `SetFont` to change it. Make sure the font exists for the full lifetime of the window though. – Mark Ransom Nov 29 '12 at 20:41
  • Thanks, Mark--This worked. Here is the code I used: ` if (!m_wndStatusBar.Create(this)) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } **m_wndStatusBar.SetFont(&bigFont);** ` – Woody20 Nov 29 '12 at 22:17
  • Addition to above: bigFont is a CFont member of CMainFrame. Bold code is my addition to the doc/view code created by the MFC Wizard. – Woody20 Nov 29 '12 at 22:24

0 Answers0