Changing the Tab Label Font


We can change the font used by the tab control to draw the labels by using the SetFont() function in the CWnd class. The code given below is very simple and does not bother with resizing the tab control or the property sheet. This works fine for fonts that are smaller than the font being used by the tab control or about the same size. A good place to put this code in is the OnInitDialog() of the CPropertySheet derived class.
	// m_fontEdit is a member variable
	// Create a bold font
	m_fontEdit.CreateFont( -8, 0, 0, 0, 700, 0, 0, 0, 1, 
			0, 0, 0, 0, _T("MS Sans Serif") );
	GetTabControl()->SetFont( &m_fontEdit );


  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • How does this impact your content strategy? Content management markets are changing rapidly. Due to increased expectations of users, changes in IT and the need for organizations to rethink their digital strategy, Gartner has launched new Magic Quadrants (MQs) for Content Services Platforms (CSP) and Content Collaboration Platforms (CCP). These MQs have updated the definition of previous Enterprise Content Management (ECM) and Enterprise File Sync and Share (EFSS) markets respectively, and are tightly connected …

  • Why use NoSQL? Innovative companies like AT&T, GE, and PayPal have successfully transitioned from relational to NoSQL for their critical web, mobile, and IoT applications. By understanding where to introduce NoSQL, how to model and access the data, and how to manage and monitor a distributed database, you can do the same. This white paper explains the need for non-relational databases, describes advantages of NoSQL, and clarifies the important difference between SQL and NoSQL databases. We walk you …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date