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.

162 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1994-1998 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
  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. COMDLL extern LPCTSTR g_lpszDummyPassword;
  23. //
  24. // Enforce minimum string length of a CString
  25. //
  26. COMDLL void
  27. AFXAPI DDV_MinChars(
  28. IN CDataExchange * pDX,
  29. IN CString const & value,
  30. IN int nChars
  31. );
  32. //
  33. // Enforce minimum and maximum string lengths of a CString
  34. //
  35. COMDLL void
  36. AFXAPI DDV_MinMaxChars(
  37. IN CDataExchange * pDX,
  38. IN CString const & value,
  39. IN int nMinChars,
  40. IN int nMaxChars
  41. );
  42. //
  43. // Spin control ddx
  44. //
  45. COMDLL void
  46. AFXAPI DDX_Spin(
  47. IN CDataExchange * pDX,
  48. IN int nIDC,
  49. IN OUT int & value
  50. );
  51. //
  52. // Enforce min/max spin control range
  53. //
  54. COMDLL void
  55. AFXAPI DDV_MinMaxSpin(
  56. IN CDataExchange * pDX,
  57. IN HWND hWndControl,
  58. IN int nLowerRange,
  59. IN int nUpperRange
  60. );
  61. //
  62. // Similar to DDX_Text -- but always display a dummy string.
  63. //
  64. COMDLL void
  65. AFXAPI DDX_Password(
  66. IN CDataExchange * pDX,
  67. IN int nIDC,
  68. IN OUT CString & value,
  69. IN LPCTSTR lpszDummy
  70. );
  71. //
  72. // DDX_Text for CILong
  73. //
  74. COMDLL void
  75. AFXAPI DDX_Text(
  76. IN CDataExchange * pDX,
  77. IN int nIDC,
  78. IN OUT CILong & value
  79. );
  80. class COMDLL CConfirmDlg : public CDialog
  81. /*++
  82. Class Description:
  83. Confirmation dialog -- brought up by the password ddx whenever
  84. password confirmation is necessary.
  85. Public Interface:
  86. CConfirmDlg : Constructor
  87. GetPassword : Password entered in the dialog
  88. --*/
  89. {
  90. //
  91. // Construction
  92. //
  93. public:
  94. CConfirmDlg(
  95. IN CWnd * pParent = NULL
  96. );
  97. public:
  98. //
  99. // Get the password that was entered in the dialog
  100. //
  101. CString & GetPassword() { return m_strPassword; }
  102. //
  103. // Dialog Data
  104. //
  105. protected:
  106. //{{AFX_DATA(CConfirmDlg)
  107. enum { IDD = IDD_CONFIRM_PASSWORD };
  108. CString m_strPassword;
  109. //}}AFX_DATA
  110. //
  111. // Overrides
  112. //
  113. protected:
  114. //{{AFX_VIRTUAL(CConfirmDlg)
  115. protected:
  116. virtual void DoDataExchange(CDataExchange * pDX);
  117. //}}AFX_VIRTUAL
  118. //
  119. // Implementation
  120. //
  121. protected:
  122. //{{AFX_MSG(CConfirmDlg)
  123. //}}AFX_MSG
  124. DECLARE_MESSAGE_MAP()
  125. };
  126. #endif // _DDXV_H