OpenDepartment.cpp
上传用户:benben_wyd
上传日期:2010-02-26
资源大小:1229k
文件大小:1k
源码类别:

书籍源码

开发平台:

Visual C++

  1. // OpenDepartment.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "OLEDBDepartmentMFC.h"
  5. #include "OpenDepartment.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // COpenDepartment dialog
  13. COpenDepartment::COpenDepartment(CWnd* pParent /*=NULL*/)
  14. : CDialog(COpenDepartment::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(COpenDepartment)
  17. m_strDepartment = _T("");
  18. //}}AFX_DATA_INIT
  19. m_bAnswer = FALSE; //Initialize answer to false.
  20. }
  21. void COpenDepartment::DoDataExchange(CDataExchange* pDX)
  22. {
  23. CDialog::DoDataExchange(pDX);
  24. //{{AFX_DATA_MAP(COpenDepartment)
  25. DDX_Text(pDX, IDC_FINDDEPARTMENT, m_strDepartment);
  26. DDV_MaxChars(pDX, m_strDepartment, 4);
  27. //}}AFX_DATA_MAP
  28. }
  29. BEGIN_MESSAGE_MAP(COpenDepartment, CDialog)
  30. //{{AFX_MSG_MAP(COpenDepartment)
  31. //}}AFX_MSG_MAP
  32. END_MESSAGE_MAP()
  33. /////////////////////////////////////////////////////////////////////////////
  34. // COpenDepartment message handlers
  35. void COpenDepartment::OnOK() 
  36. {
  37. m_bAnswer = TRUE;
  38. CDialog::OnOK();
  39. }
  40. void COpenDepartment::OnCancel() 
  41. {
  42. m_bAnswer = FALSE;
  43. CDialog::OnCancel();
  44. }