TestHMXShapedFormView.cpp
上传用户:yinguanfa
上传日期:2022-02-19
资源大小:400k
文件大小:3k
源码类别:
ListView/ListBox
开发平台:
Visual C++
- // TestHMXShapedFormView.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Test_HMXControls.h"
- #include "TestHMXShapedFormView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- CString g_sPaperBMP;
- COLORREF g_rgbPaperTransp;
- /////////////////////////////////////////////////////////////////////////////
- // CTestHMXShapedFormView
- IMPLEMENT_DYNCREATE(CTestHMXShapedFormView, CFormView)
- CTestHMXShapedFormView::CTestHMXShapedFormView()
- : CHMXShapedFormView(CTestHMXShapedFormView::IDD, g_sPaperBMP, g_rgbPaperTransp )
- {
- //{{AFX_DATA_INIT(CTestHMXShapedFormView)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- CTestHMXShapedFormView::~CTestHMXShapedFormView()
- {
- }
- void CTestHMXShapedFormView::DoDataExchange(CDataExchange* pDX)
- {
- CHMXShapedFormView::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CTestHMXShapedFormView)
- DDX_Control(pDX, IDC_LBL_COMMENTS, m_lblComments);
- DDX_Control(pDX, IDC_LBL_LAST_NAME, m_lblLast);
- DDX_Control(pDX, IDC_LBL_FIRST_NAME, m_lblFirst);
- DDX_Control(pDX, IDC_EDT_LAST, m_edtLast);
- DDX_Control(pDX, IDC_EDT_FIRST, m_edtFirst);
- DDX_Control(pDX, IDC_EDT_COMMENTS, m_edtComments);
- DDX_Control(pDX, IDC_CHK_PILOT, m_chkPilot);
- DDX_Control(pDX, IDC_CHK_GRADUATE, m_chkGraduate);
- DDX_Control(pDX, IDC_CHK_EXPERIENCE, m_chkExperience);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CTestHMXShapedFormView, CHMXShapedFormView)
- //{{AFX_MSG_MAP(CTestHMXShapedFormView)
- ON_BN_CLICKED(IDC_BTN_DISMISS, OnBtnDismiss)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CTestHMXShapedFormView diagnostics
- #ifdef _DEBUG
- void CTestHMXShapedFormView::AssertValid() const
- {
- CFormView::AssertValid();
- }
- void CTestHMXShapedFormView::Dump(CDumpContext& dc) const
- {
- CFormView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CTestHMXShapedFormView message handlers
- void CTestHMXShapedFormView::OnInitialUpdate()
- {
- GetParentFrame()->RecalcLayout();
- ResizeParentToFit(FALSE);
- GetDocument()->SetTitle("HMXShapedFormView");
- CFormView::OnInitialUpdate();
- // TODO: Add your specialized code here and/or call the base class
- m_lblFirst.SetTextClr( RGB( 0, 128, 0));
- m_lblLast.SetTextClr( RGB( 0, 128, 0));
- m_lblComments.SetTextClr( RGB( 0, 128, 0));
- m_edtFirst.SetTextFont( 10, false, false, "Arial" );
- m_edtFirst.SetBkClrFocus( RGB( 255, 255, 0));
- m_edtLast.SetTextFont( 10, false, false, "Arial" );
- m_edtLast.SetBkClrFocus( RGB( 255, 255, 0));
- m_edtComments.SetTextFont( 8, false, true, "Arial" );
- m_edtComments.SetBkClrFocus( RGB( 255, 255, 0));
- m_chkPilot.SetTextFont( 10, true, false, "Courier New");
- m_chkPilot.SetTextClr( RGB(255, 0, 0));
- }
- void CTestHMXShapedFormView::OnBtnDismiss()
- {
- // TODO: Add your control notification handler code here
- Dismiss();
- }