wizfontscriptscombobox.cpp
来自「内容包括VC++有关的各个方面的范例。包括界面的设计」· C++ 代码 · 共 57 行
CPP
57 行
// WizFontScriptsComboBox.cpp : implementation file
//
#include "stdafx.h"
#include "EnumFonts.h"
#include "WizFontScriptsComboBox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWizFontScriptsComboBox
CWizFontScriptsComboBox::CWizFontScriptsComboBox()
{
}
CWizFontScriptsComboBox::~CWizFontScriptsComboBox()
{
}
BEGIN_MESSAGE_MAP(CWizFontScriptsComboBox, CComboBox)
//{{AFX_MSG_MAP(CWizFontScriptsComboBox)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWizFontScriptsComboBox message handlers
//初始化列表框
void CWizFontScriptsComboBox::Initialize (const CWizFontsEnumerator::Font* font)
{
//清空列表框
ResetContent();
ASSERT(font);
//将该字体所有的语言种类加到列表框种
const int imax = font->GetScriptsCount();
for (int i = 0; i < imax; i++)
{
int j = AddString(font->GetScript(i));
if (j >= 0)
{
SetItemData(j, i);
}
else
{
ASSERT(0);
}
}
if (font->GetScriptsCount() > 0)
SetCurSel(0);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?