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.

153 lines
3.1 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1998.
  5. //
  6. // File: NameNotFoundDlg.hxx
  7. //
  8. // Contents: Class implementing name not found dialog
  9. //
  10. // Classes: CNameNotFoundDlg
  11. //
  12. // History: 08-14-1998 DavidMun Created
  13. //
  14. //---------------------------------------------------------------------------
  15. #ifndef __NAME_NOT_FOUND_DLG_HXX_
  16. #define __NAME_NOT_FOUND_DLG_HXX_
  17. #define MAX_OBJECTNAME_DISPLAY_LEN 30
  18. //+--------------------------------------------------------------------------
  19. //
  20. // Class: CNameNotFoundDlg
  21. //
  22. // Purpose: Invoke and operate a dialog which allows the user to correct
  23. // entries made in the name edit control.
  24. //
  25. // History: 08-14-1998 DavidMun Created
  26. //
  27. //---------------------------------------------------------------------------
  28. class CNameNotFoundDlg: public CDlg
  29. {
  30. public:
  31. CNameNotFoundDlg(
  32. const CObjectPicker &rop,
  33. ULONG idsError,
  34. String *pstrName);
  35. CNameNotFoundDlg(
  36. const CObjectPicker &rop,
  37. const String &strError,
  38. String *pstrName);
  39. virtual
  40. ~CNameNotFoundDlg();
  41. HRESULT
  42. DoModalDialog(
  43. HWND hwndParent,
  44. NAME_PROCESS_RESULT *pnpr);
  45. private:
  46. // *** CDlg overrides ***
  47. virtual HRESULT
  48. _OnInit(
  49. BOOL *pfSetFocus);
  50. virtual BOOL
  51. _OnCommand(
  52. WPARAM wParam,
  53. LPARAM lParam);
  54. virtual void
  55. _OnHelp(
  56. UINT message,
  57. WPARAM wParam,
  58. LPARAM lParam);
  59. // *** Non-override member functions ***
  60. void
  61. _EnableCorrectionCtrls(
  62. BOOL fEnable);
  63. const CObjectPicker &m_rop;
  64. ULONG m_idsError;
  65. String m_strError;
  66. String *m_pstrName;
  67. NAME_PROCESS_RESULT *m_pnpr;
  68. };
  69. //+--------------------------------------------------------------------------
  70. //
  71. // Member: CNameNotFoundDlg::CNameNotFoundDlg
  72. //
  73. // Synopsis: ctor
  74. //
  75. // History: 08-14-1998 DavidMun Created
  76. //
  77. //---------------------------------------------------------------------------
  78. inline
  79. CNameNotFoundDlg::CNameNotFoundDlg(
  80. const CObjectPicker &rop,
  81. ULONG idsError,
  82. String *pstrName):
  83. m_rop(rop),
  84. m_idsError(idsError),
  85. m_pstrName(pstrName),
  86. m_pnpr(NULL)
  87. {
  88. TRACE_CONSTRUCTOR(CNameNotFoundDlg);
  89. }
  90. inline
  91. CNameNotFoundDlg::CNameNotFoundDlg(
  92. const CObjectPicker &rop,
  93. const String &strError,
  94. String *pstrName):
  95. m_rop(rop),
  96. m_idsError(0),
  97. m_strError(strError),
  98. m_pstrName(pstrName),
  99. m_pnpr(NULL)
  100. {
  101. TRACE_CONSTRUCTOR(CNameNotFoundDlg);
  102. }
  103. //+--------------------------------------------------------------------------
  104. //
  105. // Member: CNameNotFoundDlg::~CNameNotFoundDlg
  106. //
  107. // Synopsis: dtor
  108. //
  109. // History: 08-14-1998 DavidMun Created
  110. //
  111. //---------------------------------------------------------------------------
  112. inline
  113. CNameNotFoundDlg::~CNameNotFoundDlg()
  114. {
  115. TRACE_DESTRUCTOR(CNameNotFoundDlg);
  116. m_pstrName = NULL;
  117. m_pnpr = NULL;
  118. }
  119. #endif // __NAME_NOT_FOUND_DLG_HXX_