Cool Font selection combo | CodeGuru

Cool Font selection combo

This article was contributed by Norm Almond of Paramax Technology Limited I came accross a fancy font selection box the other day. It was so cool I thought I’d copy the idea. Its basically an imitation of the font selection box found in MS Word, it has an MRU font list and the other cool […]

Written By
CodeGuru Staff
CodeGuru Staff
Oct 19, 1998
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

This article was contributed by Norm Almond of
Paramax Technology Limited

I came accross a fancy font selection box the other day. It was so cool
I thought I’d copy the idea.

Its basically an imitation of the font selection box found in MS Word,
it has an MRU font list and the other cool feature is that it has a Tooltip window showing
the currently selected font name displayed using the selected font. This gives the user a
sample of what the font is going to look like without actually making a selection.

The main component is an ownerdraw combo with has
strings
flags set, the combo isn’t sorted because the Most
Recently Used font are at  the top of the combo.

The combo is called CFontCombo it is simple to use in dialog boxes, just
follow this simple instructions.

  1. Copy "FontCombo.h" and "TipWnd.h" to your project directory.
  2. Add the files to your project.
  3. Copy the "Printer.bmp" to your project "res" directory.
  4. #include "FontCombo.h" and "TipWnd.h" to the header file of your
    dialog class or to the "stdafx.h"
  5. Using the resource studio Import the printer.bmp and name it IDB_GLYPHS
  6. Using the dialog editor create your combo box and give it the following styles:
    "DropDown", Fixed, "Has Strings", and Verticle Scroll .
  7. Edit the dialogs class header file replace "CComboBox" for CFontCombo
  8. In OnInitDialog before the return statement Add the following line

    m_yourCombo.SubclassDlgItem(IDC_COMBOID,this);

    m_yourCombo.Initialize();

fontcombo.gif (5338 bytes)

Files and resources needed to be included into you own project:

FontCombo.h & cpp

TipWnd.h & cpp,

IDB_GLYPH bitmap resource

Download Source Code

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.