ItemActiveDlg.cpp
上传用户:fuyouda
上传日期:2015-08-19
资源大小:6876k
文件大小:1k
源码类别:

家庭/个人应用

开发平台:

Visual C++

  1. // ItemActiveDlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "DAC_VCDEMO.h"
  5. #include "ItemActiveDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // ItemActiveDlg dialog
  13. ItemActiveDlg::ItemActiveDlg(CWnd* pParent /*=NULL*/)
  14. : CDialog(ItemActiveDlg::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(ItemActiveDlg)
  17. // NOTE: the ClassWizard will add member initialization here
  18. //}}AFX_DATA_INIT
  19. }
  20. void ItemActiveDlg::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(ItemActiveDlg)
  24. DDX_Control(pDX, IDC_CHECK, m_Check);
  25. //}}AFX_DATA_MAP
  26. }
  27. BEGIN_MESSAGE_MAP(ItemActiveDlg, CDialog)
  28. //{{AFX_MSG_MAP(ItemActiveDlg)
  29. ON_WM_SHOWWINDOW()
  30. ON_BN_CLICKED(IDC_CHECK, OnCheck)
  31. //}}AFX_MSG_MAP
  32. END_MESSAGE_MAP()
  33. /////////////////////////////////////////////////////////////////////////////
  34. // ItemActiveDlg message handlers
  35. void ItemActiveDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
  36. {
  37. CDialog::OnShowWindow(bShow, nStatus);
  38. if(Active)
  39. m_Check.SetCheck(1);
  40. else
  41. m_Check.SetCheck(0);
  42. }
  43. void ItemActiveDlg::OnCheck() 
  44. {
  45. if(m_Check.GetCheck()==0)
  46. Active=false;
  47. else
  48. Active=true;
  49. }