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.

56 lines
1.5 KiB

  1. /****************************************************************************\
  2. *
  3. * passdlg.h
  4. *
  5. * Created: William Taylor (wtaylor) 01/22/01
  6. *
  7. * MS Ratings Password Dialog
  8. *
  9. \****************************************************************************/
  10. #ifndef PASSWORD_DIALOG_H
  11. #define PASSWORD_DIALOG_H
  12. #include "basedlg.h" // CBaseDialog
  13. const UINT PASSCONFIRM_FAIL = 0;
  14. const UINT PASSCONFIRM_OK = 1;
  15. const UINT PASSCONFIRM_NEW = 2;
  16. class CPasswordDialog: public CBaseDialog<CPasswordDialog>
  17. {
  18. private:
  19. static DWORD aIds[];
  20. int m_idsLabel;
  21. bool m_fCheckPassword;
  22. public:
  23. enum { IDD = IDD_PASSWORD };
  24. public:
  25. CPasswordDialog( int p_idsLabel, bool p_fCheckPassword = true );
  26. public:
  27. typedef CPasswordDialog thisClass;
  28. typedef CBaseDialog<thisClass> baseClass;
  29. BEGIN_MSG_MAP(thisClass)
  30. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  31. MESSAGE_HANDLER(WM_HELP, OnHelp)
  32. MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)
  33. COMMAND_ID_HANDLER(IDOK, OnOK)
  34. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  35. CHAIN_MSG_MAP(baseClass)
  36. END_MSG_MAP()
  37. protected:
  38. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  39. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  40. LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  41. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  42. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  43. };
  44. #endif