Click here to Skip to main content
15,896,201 members
Articles / Desktop Programming / WTL

Font Enumerator

Rate me:
Please Sign up or sign in to vote.
5.00/5 (10 votes)
1 Sep 2009CPOL7 min read 36.1K   3.1K   26  
A tool that enumerates all fonts installed on Windows, and shows you the preview so as to help you code conveniently.
// This file was generated by WTL Dialog wizard 
// InputSampleString.h : Declaration of the InputSampleString

#pragma once

#include "resource.h"       // main symbols
#include <atlddx.h>
#include <string>
#include <stlHelper.hpp>
// InputSampleString

class InputSampleString : 
	public CDialogImpl<InputSampleString>,
	public CWinDataExchange<InputSampleString>	
{
public:
	enum { LIMIT_TEXT = 40 };

	CEdit		m_wndSample;
	CButton		m_wndIdok;
	CButton		m_wndIdcancel;

	std::tstring	m_strExample;

	InputSampleString(std::tstring& strSample);
	~InputSampleString();

	enum { IDD = IDD_DIALOG_INPUT_SAMPLE };

    BEGIN_MSG_MAP(InputSampleString)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
        COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
        COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
    END_MSG_MAP()

	BEGIN_DDX_MAP(InputSampleString)
		DDX_CONTROL_HANDLE(IDC_EDIT_SAMPLE, m_wndSample)
		DDX_CONTROL_HANDLE(IDOK, m_wndIdok)
		DDX_CONTROL_HANDLE(IDCANCEL, m_wndIdcancel)
	END_DDX_MAP()
    // Handler prototypes:
    //  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
    //  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
    //  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
};

#define STR_CONFIRM			_T("Ȯ��")
#define STR_CANCEL			_T("���")
#define STR_INPUT_EXAMPLE	_T("���� ���ڿ� �ٲٱ�")

#define STR_CONFIRM_ENG			_T("OK")
#define STR_CANCEL_ENG			_T("Cancel")
#define STR_INPUT_EXAMPLE_ENG	_T("Change the sample string")

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)


Written By
Korea (Republic of) Korea (Republic of)
I like programming.
I am teaching at AUCA (American University of Central Asia) now.

Comments and Discussions