TestHMXShapedFormView.cpp
上传用户:yinguanfa
上传日期:2022-02-19
资源大小:400k
文件大小:3k
源码类别:

ListView/ListBox

开发平台:

Visual C++

  1. // TestHMXShapedFormView.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "Test_HMXControls.h"
  5. #include "TestHMXShapedFormView.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. CString g_sPaperBMP;
  12. COLORREF g_rgbPaperTransp;
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CTestHMXShapedFormView
  15. IMPLEMENT_DYNCREATE(CTestHMXShapedFormView, CFormView)
  16. CTestHMXShapedFormView::CTestHMXShapedFormView()
  17. : CHMXShapedFormView(CTestHMXShapedFormView::IDD, g_sPaperBMP, g_rgbPaperTransp )
  18. {
  19. //{{AFX_DATA_INIT(CTestHMXShapedFormView)
  20. // NOTE: the ClassWizard will add member initialization here
  21. //}}AFX_DATA_INIT
  22. }
  23. CTestHMXShapedFormView::~CTestHMXShapedFormView()
  24. {
  25. }
  26. void CTestHMXShapedFormView::DoDataExchange(CDataExchange* pDX)
  27. {
  28. CHMXShapedFormView::DoDataExchange(pDX);
  29. //{{AFX_DATA_MAP(CTestHMXShapedFormView)
  30. DDX_Control(pDX, IDC_LBL_COMMENTS, m_lblComments);
  31. DDX_Control(pDX, IDC_LBL_LAST_NAME, m_lblLast);
  32. DDX_Control(pDX, IDC_LBL_FIRST_NAME, m_lblFirst);
  33. DDX_Control(pDX, IDC_EDT_LAST, m_edtLast);
  34. DDX_Control(pDX, IDC_EDT_FIRST, m_edtFirst);
  35. DDX_Control(pDX, IDC_EDT_COMMENTS, m_edtComments);
  36. DDX_Control(pDX, IDC_CHK_PILOT, m_chkPilot);
  37. DDX_Control(pDX, IDC_CHK_GRADUATE, m_chkGraduate);
  38. DDX_Control(pDX, IDC_CHK_EXPERIENCE, m_chkExperience);
  39. //}}AFX_DATA_MAP
  40. }
  41. BEGIN_MESSAGE_MAP(CTestHMXShapedFormView, CHMXShapedFormView)
  42. //{{AFX_MSG_MAP(CTestHMXShapedFormView)
  43. ON_BN_CLICKED(IDC_BTN_DISMISS, OnBtnDismiss)
  44. //}}AFX_MSG_MAP
  45. END_MESSAGE_MAP()
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CTestHMXShapedFormView diagnostics
  48. #ifdef _DEBUG
  49. void CTestHMXShapedFormView::AssertValid() const
  50. {
  51. CFormView::AssertValid();
  52. }
  53. void CTestHMXShapedFormView::Dump(CDumpContext& dc) const
  54. {
  55. CFormView::Dump(dc);
  56. }
  57. #endif //_DEBUG
  58. /////////////////////////////////////////////////////////////////////////////
  59. // CTestHMXShapedFormView message handlers
  60. void CTestHMXShapedFormView::OnInitialUpdate() 
  61. {
  62. GetParentFrame()->RecalcLayout();
  63. ResizeParentToFit(FALSE);
  64. GetDocument()->SetTitle("HMXShapedFormView");
  65. CFormView::OnInitialUpdate();
  66. // TODO: Add your specialized code here and/or call the base class
  67. m_lblFirst.SetTextClr( RGB( 0, 128, 0));
  68. m_lblLast.SetTextClr( RGB( 0, 128, 0));
  69. m_lblComments.SetTextClr( RGB( 0, 128, 0));
  70. m_edtFirst.SetTextFont( 10, false, false, "Arial" );
  71. m_edtFirst.SetBkClrFocus( RGB( 255, 255, 0));
  72. m_edtLast.SetTextFont( 10, false, false, "Arial" );
  73. m_edtLast.SetBkClrFocus( RGB( 255, 255, 0));
  74. m_edtComments.SetTextFont( 8, false, true, "Arial" );
  75. m_edtComments.SetBkClrFocus( RGB( 255, 255, 0));
  76. m_chkPilot.SetTextFont( 10, true, false, "Courier New");
  77. m_chkPilot.SetTextClr( RGB(255, 0, 0));
  78. }
  79. void CTestHMXShapedFormView::OnBtnDismiss() 
  80. {
  81. // TODO: Add your control notification handler code here
  82. Dismiss();
  83. }