GetFontNameDlg.cpp
上传用户:niucheng
上传日期:2007-01-02
资源大小:56k
文件大小:1k
- // GetFontNameDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "RichEd.h"
- #include "GetFontNameDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CGetFontNameDlg dialog
- CGetFontNameDlg::CGetFontNameDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CGetFontNameDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CGetFontNameDlg)
- m_sFontName = _T("");
- //}}AFX_DATA_INIT
- }
- void CGetFontNameDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CGetFontNameDlg)
- DDX_Control(pDX, IDC_COMBO, m_combo);
- DDX_CBString(pDX, IDC_COMBO, m_sFontName);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CGetFontNameDlg, CDialog)
- //{{AFX_MSG_MAP(CGetFontNameDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CGetFontNameDlg message handlers
- BOOL CGetFontNameDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
-
- // Fill up the fonts...
- for (int i = 0; i <= m_psaFontList->GetSize()-1; i++)
- m_combo.AddString(m_psaFontList->GetAt(i));
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }