Operator Console
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | List of all members
CPasswordDialog Class Reference

a class for a simple password query dialog More...

#include <PasswordDialog.h>

Inheritance diagram for CPasswordDialog:
[legend]

Public Types

enum  { IDD = IDD_DIALOG_PWD }
 
enum  { IDD = IDD_DIALOG_PWD }
 

Public Member Functions

 CPasswordDialog (CWnd *pParent=NULL)
 
virtual ~CPasswordDialog ()
 
const CString getResponse (void)
 returns what the user entered as the password More...
 
const bool getUnlockStatus (void)
 returns whether the user decided to unlock access to pass/fail settings until the program closes More...
 
afx_msg void OnBnClickedOk ()
 
afx_msg void OnClickedCheckRetainAccess ()
 
virtual BOOL OnInitDialog ()
 
 CPasswordDialog (CWnd *pParent=NULL)
 
virtual ~CPasswordDialog ()
 
const CString getResponse (void)
 returns what the user entered as the password More...
 
const bool getUnlockStatus (void)
 returns whether the user decided to unlock access to pass/fail settings until the program closes More...
 
afx_msg void OnBnClickedOk ()
 
afx_msg void OnClickedCheckRetainAccess ()
 
virtual BOOL OnInitDialog ()
 

Public Attributes

CEdit c_edit_password
 
CButton c_unlock
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
 
virtual void DoDataExchange (CDataExchange *pDX)
 

Private Attributes

CString m_password
 the user-supplied password attempt More...
 
bool m_unlock
 the user-supplied choice for unlocking administrator access to pass/fail settings More...
 

Detailed Description

a class for a simple password query dialog

Member Enumeration Documentation

anonymous enum
Enumerator
IDD 
38 { IDD = IDD_DIALOG_PWD };
Definition: PasswordDialog.h:38
#define IDD_DIALOG_PWD
Definition: resource.h:41
anonymous enum
Enumerator
IDD 
38 { IDD = IDD_DIALOG_PWD };
Definition: PasswordDialog.h:38
#define IDD_DIALOG_PWD
Definition: resource.h:41

Constructor & Destructor Documentation

CPasswordDialog::CPasswordDialog ( CWnd *  pParent = NULL)
34  : CDialogEx(CPasswordDialog::IDD, pParent)
35 {
36 
37  m_password.SetString(_T(""));
38  m_unlock = false;
39 }
Definition: PasswordDialog.h:38
bool m_unlock
the user-supplied choice for unlocking administrator access to pass/fail settings ...
Definition: PasswordDialog.h:50
CString m_password
the user-supplied password attempt
Definition: PasswordDialog.h:49
CPasswordDialog::~CPasswordDialog ( )
virtual
42 {
43 }
CPasswordDialog::CPasswordDialog ( CWnd *  pParent = NULL)
virtual CPasswordDialog::~CPasswordDialog ( )
virtual

Member Function Documentation

void CPasswordDialog::DoDataExchange ( CDataExchange *  pDX)
protectedvirtual

References c_edit_password, c_unlock, IDC_CHECK_RETAIN_ACCESS, and IDC_EDIT_PWD.

46 {
47  CDialogEx::DoDataExchange(pDX);
48  DDX_Control(pDX, IDC_EDIT_PWD, c_edit_password);
49  DDX_Control(pDX, IDC_CHECK_RETAIN_ACCESS, c_unlock);
50 }
#define IDC_CHECK_RETAIN_ACCESS
Definition: resource.h:92
CButton c_unlock
Definition: PasswordDialog.h:46
#define IDC_EDIT_PWD
Definition: resource.h:71
CEdit c_edit_password
Definition: PasswordDialog.h:45
virtual void CPasswordDialog::DoDataExchange ( CDataExchange *  pDX)
protectedvirtual
const CString CPasswordDialog::getResponse ( void  )

returns what the user entered as the password

Referenced by COperatorConsoleApp::OnPassFail().

63 {
64  return m_password;
65 }
CString m_password
the user-supplied password attempt
Definition: PasswordDialog.h:49

Here is the caller graph for this function:

const CString CPasswordDialog::getResponse ( void  )

returns what the user entered as the password

const bool CPasswordDialog::getUnlockStatus ( void  )

returns whether the user decided to unlock access to pass/fail settings until the program closes

const bool CPasswordDialog::getUnlockStatus ( void  )

returns whether the user decided to unlock access to pass/fail settings until the program closes

References m_unlock.

Referenced by COperatorConsoleApp::OnPassFail().

83 {
84  return m_unlock;
85 }
bool m_unlock
the user-supplied choice for unlocking administrator access to pass/fail settings ...
Definition: PasswordDialog.h:50

Here is the caller graph for this function:

void CPasswordDialog::OnBnClickedOk ( )

References c_edit_password, and m_password.

69 {
70  // TODO: Add your control notification handler code here
71  CDialogEx::OnOK();
72  c_edit_password.GetWindowTextA(m_password); // copy the entered password to the private variable;
73 }
CEdit c_edit_password
Definition: PasswordDialog.h:45
CString m_password
the user-supplied password attempt
Definition: PasswordDialog.h:49
afx_msg void CPasswordDialog::OnBnClickedOk ( )
afx_msg void CPasswordDialog::OnClickedCheckRetainAccess ( )
void CPasswordDialog::OnClickedCheckRetainAccess ( )

References c_unlock, and m_unlock.

77 {
78  m_unlock = (BST_CHECKED==c_unlock.GetCheck());
79 }
CButton c_unlock
Definition: PasswordDialog.h:46
bool m_unlock
the user-supplied choice for unlocking administrator access to pass/fail settings ...
Definition: PasswordDialog.h:50
BOOL CPasswordDialog::OnInitDialog ( )
virtual

References c_unlock, and m_unlock.

89 {
90  CDialogEx::OnInitDialog();
91 
92  if (m_unlock)
93  {
94  c_unlock.SetCheck(BST_CHECKED);
95  }
96  else
97  {
98  c_unlock.SetCheck(BST_UNCHECKED);
99  }
100 
101  return TRUE; // return TRUE unless you set the focus to a control
102  // EXCEPTION: OCX Property Pages should return FALSE
103 }
CButton c_unlock
Definition: PasswordDialog.h:46
bool m_unlock
the user-supplied choice for unlocking administrator access to pass/fail settings ...
Definition: PasswordDialog.h:50
virtual BOOL CPasswordDialog::OnInitDialog ( )
virtual

Member Data Documentation

CEdit CPasswordDialog::c_edit_password

Referenced by DoDataExchange(), and OnBnClickedOk().

CButton CPasswordDialog::c_unlock
CString CPasswordDialog::m_password
private

the user-supplied password attempt

Referenced by OnBnClickedOk().

bool CPasswordDialog::m_unlock
private

the user-supplied choice for unlocking administrator access to pass/fail settings

Referenced by getUnlockStatus(), OnClickedCheckRetainAccess(), and OnInitDialog().


The documentation for this class was generated from the following files: