Leaked source code of windows server 2003
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.

37 lines
1.2 KiB

  1. #ifndef __DELMAILDLG_H
  2. #define __DELMAILDLG_H
  3. class CDeleteMailboxDlg : public CDialogImpl<CDeleteMailboxDlg>
  4. {
  5. public:
  6. typedef CDialogImpl<CDeleteMailboxDlg> BC;
  7. CDeleteMailboxDlg::CDeleteMailboxDlg(BOOL bHashPW) : m_bHashPW(bHashPW), m_bCreateUser(bHashPW) {};
  8. enum { IDD = IDD_DELETE_MAILBOX };
  9. BEGIN_MSG_MAP( CDeleteMailboxDlg )
  10. MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
  11. COMMAND_RANGE_HANDLER (IDYES, IDNO, OnClose)
  12. END_MSG_MAP()
  13. LRESULT OnInitDialog( UINT mMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
  14. {
  15. CheckDlgButton(IDC_DELETE_ACCOUNT, (m_bHashPW ? BST_CHECKED : BST_UNCHECKED) );
  16. Prefix_EnableWindow( m_hWnd, IDC_DELETE_ACCOUNT, (m_bHashPW ? FALSE : TRUE) );
  17. ::ShowWindow( GetDlgItem(IDC_DELETE_ACCOUNT), (m_bHashPW ? SW_HIDE : SW_SHOW) );
  18. return 0;
  19. }
  20. // message handlers
  21. LRESULT OnClose( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
  22. {
  23. m_bCreateUser = (IsDlgButtonChecked(IDC_DELETE_ACCOUNT) == BST_CHECKED);
  24. EndDialog(wID);
  25. return 0;
  26. }
  27. BOOL m_bHashPW;
  28. BOOL m_bCreateUser;
  29. };
  30. #endif //__DELMAILDLG_H