Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.7 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1998.
  5. //
  6. // File: EdtStr.cpp
  7. //
  8. // Contents: simple string edit dialog
  9. //
  10. // Classes: CEditString
  11. //
  12. // History: 03-14-1998 stevebl Commented
  13. //
  14. //---------------------------------------------------------------------------
  15. #include "precomp.hxx"
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CEditString dialog
  23. CEditString::CEditString(CWnd* pParent /*=NULL*/)
  24. : CDialog(CEditString::IDD, pParent)
  25. {
  26. //{{AFX_DATA_INIT(CEditString)
  27. m_sz = _T("");
  28. m_szTitle = _T("");
  29. //}}AFX_DATA_INIT
  30. }
  31. void CEditString::DoDataExchange(CDataExchange* pDX)
  32. {
  33. CDialog::DoDataExchange(pDX);
  34. //{{AFX_DATA_MAP(CEditString)
  35. DDX_Text(pDX, IDC_EDIT1, m_sz);
  36. DDV_MaxChars(pDX, m_sz, 40);
  37. //}}AFX_DATA_MAP
  38. }
  39. BEGIN_MESSAGE_MAP(CEditString, CDialog)
  40. //{{AFX_MSG_MAP(CEditString)
  41. ON_WM_CONTEXTMENU()
  42. //}}AFX_MSG_MAP
  43. END_MESSAGE_MAP()
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CEditString message handlers
  46. BOOL CEditString::OnInitDialog()
  47. {
  48. CDialog::OnInitDialog();
  49. SetWindowText(m_szTitle);
  50. // TODO: Add extra initialization here
  51. return TRUE; // return TRUE unless you set the focus to a control
  52. // EXCEPTION: OCX Property Pages should return FALSE
  53. }
  54. void CEditString::OnContextMenu(CWnd* pWnd, CPoint point)
  55. {
  56. StandardContextMenu(pWnd->m_hWnd, IDD_EDITSTRING);
  57. }