AnimatePropDlg.cpp
上传用户:ywlong9188
上传日期:2022-05-31
资源大小:2656k
文件大小:2k
- // AnimatePropDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "animatepropdlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CAnimatePropDlg dialog
- CAnimatePropDlg::CAnimatePropDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CAnimatePropDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CAnimatePropDlg)
- m_sParam = _T("");
- m_sNumber = _T("");
- m_sFontName = _T("");
- m_sPointSize = _T("");
- m_name = _T("");
- //}}AFX_DATA_INIT
- }
- void CAnimatePropDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CAnimatePropDlg)
- DDX_Control(pDX, IDC_ANIMATE_FONT_POINT, m_cPointSize);
- DDX_Control(pDX, IDC_ANIMATE_FONT_NAME, m_cFontName);
- DDX_Text(pDX, IDC_ANIMATE_EDIT1, m_sParam);
- DDX_Text(pDX, IDC_ANIMATE_EDIT2, m_sNumber);
- DDX_Text(pDX, IDC_ANIMATE_FONT_NAME, m_sFontName);
- DDX_Text(pDX, IDC_ANIMATE_FONT_POINT, m_sPointSize);
- DDX_Text(pDX, IDC_ANIMATE_NAME, m_name);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CAnimatePropDlg, CDialog)
- //{{AFX_MSG_MAP(CAnimatePropDlg)
- ON_BN_CLICKED(IDC_ANIMATE_TEXT_SET, OnAnimateTextSet)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CAnimatePropDlg message handlers
- void CAnimatePropDlg::OnAnimateTextSet()
- {
- // TODO: Add your control notification handler code here
-
- CFontDialog fDlg( &m_logFont);
- fDlg.m_cf.rgbColors = m_cColor;
- if( fDlg.DoModal() == IDOK)
- {
- CString str;
-
- m_nSize = fDlg.GetSize()/10;
- if(!fDlg.GetFaceName().IsEmpty())
- m_sFaceName = fDlg.GetFaceName();
- m_cColor = fDlg.GetColor();
- fDlg.GetCurrentFont( &m_logFont );
- str.Format("%d",m_nSize);
- m_cPointSize.SetWindowText(str);
- m_cFontName.SetWindowText(m_sFaceName);
-
- }
- }
- int CAnimatePropDlg::GetSize()
- {
- return m_nSize;
- }
- CString CAnimatePropDlg::GetFaceName()
- {
- return m_sFaceName;
- }
- void CAnimatePropDlg::SetColor(COLORREF& color)
- {
- m_cColor = color;
- }
- void CAnimatePropDlg::GetColor(COLORREF& color)
- {
- color = m_cColor;
- }