Page1.cpp
上传用户:ledjyj
上传日期:2019-03-13
资源大小:36k
文件大小:1k
源码类别:

工具条

开发平台:

Visual C++

  1. // Page1.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "tab_dlg_bar.h"
  5. #include "Page1.h"
  6. #include ".page1.h"
  7. // CPage1 dialog
  8. IMPLEMENT_DYNAMIC(CPage1, CPropertyPage)
  9. CPage1::CPage1()
  10. : CPropertyPage(CPage1::IDD)
  11. , int1(0)
  12. {
  13. }
  14. CPage1::~CPage1()
  15. {
  16. }
  17. void CPage1::DoDataExchange(CDataExchange* pDX)
  18. {
  19. CPropertyPage::DoDataExchange(pDX);
  20. DDX_Text(pDX, IDC_EDIT1, int1);
  21. DDV_MinMaxInt(pDX, int1, 0, 100);
  22. }
  23. BEGIN_MESSAGE_MAP(CPage1, CPropertyPage)
  24. // ON_EN_CHANGE(IDC_EDIT1, OnEnChangeEdit1)
  25. ON_EN_KILLFOCUS(IDC_EDIT1, OnEnKillfocusEdit1)
  26. ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
  27. END_MESSAGE_MAP()
  28. // CPage1 message handlers
  29. void CPage1::OnEnKillfocusEdit1()
  30. {
  31. if (UpdateData()==FALSE)
  32. return;
  33. CString str;
  34. str.Format("page one value = %d",int1);
  35. m_pView->SetWindowText(str);
  36. }
  37. void CPage1::OnBnClickedButton1()
  38. {
  39. AfxMessageBox("Doesn't do much");
  40. }