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.

173 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1994-1999 Microsoft Corporation
  3. Module Name :
  4. ddxv.h
  5. Abstract:
  6. DDX/DDV Routine definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager (cluster edition)
  11. Revision History:
  12. --*/
  13. #ifndef _DDXV_H_
  14. #define _DDXV_H_
  15. //
  16. // Helper macro to convert ID of dialog child control to window handle
  17. //
  18. #define CONTROL_HWND(nID) (::GetDlgItem(m_hWnd, nID))
  19. //
  20. // Dummy password
  21. //
  22. extern LPCTSTR COMDLL g_lpszDummyPassword;
  23. //
  24. // Enforce minimum string length of a CString
  25. //
  26. void
  27. COMDLL
  28. AFXAPI DDV_MinChars(
  29. IN CDataExchange * pDX,
  30. IN CString const & value,
  31. IN int nChars
  32. );
  33. //
  34. // Enforce minimum and maximum string lengths of a CString
  35. //
  36. void
  37. COMDLL
  38. AFXAPI DDV_MinMaxChars(
  39. IN CDataExchange * pDX,
  40. IN CString const & value,
  41. IN int nMinChars,
  42. IN int nMaxChars
  43. );
  44. //
  45. // Spin control ddx
  46. //
  47. void
  48. COMDLL
  49. AFXAPI DDX_Spin(
  50. IN CDataExchange * pDX,
  51. IN int nIDC,
  52. IN OUT int & value
  53. );
  54. //
  55. // Enforce min/max spin control range
  56. //
  57. void
  58. COMDLL
  59. AFXAPI DDV_MinMaxSpin(
  60. IN CDataExchange * pDX,
  61. IN HWND hWndControl,
  62. IN int nLowerRange,
  63. IN int nUpperRange
  64. );
  65. //
  66. // Similar to DDX_Text -- but always display a dummy string.
  67. //
  68. void
  69. COMDLL
  70. AFXAPI DDX_Password(
  71. IN CDataExchange * pDX,
  72. IN int nIDC,
  73. IN OUT CString & value,
  74. IN LPCTSTR lpszDummy
  75. );
  76. //
  77. // DDX_Text for CILong
  78. //
  79. void
  80. COMDLL
  81. AFXAPI DDX_Text(
  82. IN CDataExchange * pDX,
  83. IN int nIDC,
  84. IN OUT CILong & value
  85. );
  86. class COMDLL CConfirmDlg : public CDialog
  87. /*++
  88. Class Description:
  89. Confirmation dialog -- brought up by the password ddx whenever
  90. password confirmation is necessary.
  91. Public Interface:
  92. CConfirmDlg : Constructor
  93. GetPassword : Password entered in the dialog
  94. --*/
  95. {
  96. //
  97. // Construction
  98. //
  99. public:
  100. CConfirmDlg(
  101. IN CWnd * pParent = NULL
  102. );
  103. public:
  104. //
  105. // Get the password that was entered in the dialog
  106. //
  107. CString & GetPassword() { return m_strPassword; }
  108. //
  109. // Dialog Data
  110. //
  111. protected:
  112. //{{AFX_DATA(CConfirmDlg)
  113. enum { IDD = IDD_CONFIRM_PASSWORD };
  114. CString m_strPassword;
  115. //}}AFX_DATA
  116. //
  117. // Overrides
  118. //
  119. protected:
  120. //{{AFX_VIRTUAL(CConfirmDlg)
  121. protected:
  122. virtual void DoDataExchange(CDataExchange * pDX);
  123. //}}AFX_VIRTUAL
  124. //
  125. // Implementation
  126. //
  127. protected:
  128. //{{AFX_MSG(CConfirmDlg)
  129. //}}AFX_MSG
  130. DECLARE_MESSAGE_MAP()
  131. };
  132. #endif // _DDXV_H