/*++ Copyright (C) 1998-1999 Microsoft Corporation Module Name: fileprop.cpp Abstract: Implementation of the files property page. --*/ #include "stdafx.h" #include "dialogs.h" #include "smcfghlp.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif USE_HANDLE_MACROS("SMLOGCFG(dialogs.cpp)"); static ULONG sPASSWORD_aulHelpIds[] = { IDC_USERNAME, IDH_USERNAME, IDC_PASSWORD1, IDH_CTRS_ENTER_PWD, IDC_PASSWORD2, IDH_CTRS_REENTER_PWD, 0,0 }; void KillString( CString& str ) { LONG nSize = str.GetLength(); for( LONG i=0;iEnableWindow(FALSE); GetDlgItem( IDC_PASSWORD1 )->SetFocus(); } CDialog::OnInitDialog(); return FALSE; } void CPasswordDlg::OnOK() { UpdateData(); if( m_strPassword1 != m_strPassword2 ){ CString strMessage; CString strTitle; strMessage.LoadString ( IDS_BAD_PASSWORD_MATCH ); strTitle.LoadString( IDS_PASSWORD_TITLE ); MessageBox ( strMessage, strTitle, MB_OK | MB_ICONERROR); GetDlgItem( IDC_PASSWORD1 )->SetFocus(); return; } CDialog::OnOK(); } BOOL CPasswordDlg::OnHelpInfo(HELPINFO * pHelpInfo) { if (pHelpInfo->iCtrlId >= IDC_PWD_FIRST_HELP_CTRL_ID || pHelpInfo->iCtrlId == IDOK || pHelpInfo->iCtrlId== IDCANCEL ) { InvokeWinHelp(WM_HELP, NULL, (LPARAM) pHelpInfo, m_strHelpFilePath, sPASSWORD_aulHelpIds); } return TRUE; } DWORD CPasswordDlg::SetContextHelpFilePath(const CString& rstrPath) { DWORD dwStatus = ERROR_SUCCESS; MFC_TRY m_strHelpFilePath = rstrPath; MFC_CATCH_DWSTATUS return dwStatus; } BEGIN_MESSAGE_MAP(CPasswordDlg, CDialog) //{{AFX_MSG_MAP(CPasswordDlg) ON_WM_HELPINFO() //}}AFX_MSG_MAP END_MESSAGE_MAP()