Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Font Enumerator

, 1 Sep 2009
A tool that enumerates all fonts installed on Windows, and shows you the preview so as to help you code conveniently.
fontenumerator.zip
fontenumerator_demo.zip
fontenumerator_src.zip
FontEnumerator
res
FontEnumerator.ico
Youngho.bmp
YTL
// EnumFonts.cpp : main source file for EnumFonts.exe
//

#include "stdafx.h"

#include "resource.h"

#include "MainDlg.h"

CAppModule _Module;

int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpstrCmdLine*/, int /*nCmdShow*/)
{
	HRESULT hRes = ::CoInitialize(NULL);
// If you are running on NT 4.0 or higher you can use the following call instead to 
// make the EXE free threaded. This means that calls come in on a random RPC thread.
//	HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
	ATLASSERT(SUCCEEDED(hRes));

	// this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
	::DefWindowProc(NULL, 0, 0, 0L);

	AtlInitCommonControls(ICC_BAR_CLASSES);	// add flags to support other controls

	hRes = _Module.Init(NULL, hInstance);
	ATLASSERT(SUCCEEDED(hRes));

	int nRet = 0;
	// BLOCK: Run application
	{
		CMainDlg dlgMain;
		nRet = dlgMain.DoModal();
	}

	_Module.Term();
	::CoUninitialize();

	return nRet;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

PARK Youngho

Korea (Republic Of) Korea (Republic Of)
I like programming.

| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 2 Sep 2009
Article Copyright 2009 by PARK Youngho
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid