Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Protected Member Functions
CPromptPasswordDialog Class Reference

#include <Dialogs.h>

Collaboration diagram for CPromptPasswordDialog:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { IDD = IDD_PROMPT_PASSWORD_DIALOG }
enum  { IDD = IDD_PROMPT_PASSWORD_DIALOG }

Public Member Functions

 CPromptPasswordDialog (CWnd *pParent, const char *pTitle, const char *pText, const char *pInitPasswordText, BOOL bHasCheck, const char *pCheckText, int initCheckVal)
 CPromptPasswordDialog (CWnd *pParent, const TCHAR *pTitle, const TCHAR *pText, const TCHAR *pInitPasswordText, BOOL bHasCheck, const TCHAR *pCheckText, int initCheckVal)

Public Attributes

CString m_csDialogTitle
CString m_csPromptText
CString m_csPassword
BOOL m_bHasCheckBox
CString m_csCheckBoxText
int m_bCheckBoxValue

Protected Member Functions

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

Detailed Description

Definition at line 73 of file Dialogs.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
IDD 

Definition at line 81 of file Dialogs.h.

anonymous enum
Enumerator:
IDD 

Definition at line 74 of file Dialogs.h.


Constructor & Destructor Documentation

CPromptPasswordDialog::CPromptPasswordDialog ( CWnd *  pParent,
const char *  pTitle,
const char *  pText,
const char *  pInitPasswordText,
BOOL  bHasCheck,
const char *  pCheckText,
int  initCheckVal 
)

Definition at line 125 of file Dialogs.cpp.

    : CDialog(CPromptPasswordDialog::IDD, pParent),
    m_bHasCheckBox(bHasCheck), m_bCheckBoxValue(initCheckVal)
{   
       if(pTitle)
              m_csDialogTitle = pTitle;
       if(pText)
              m_csPromptText = pText;
       if(pInitPasswordText)
           m_csPassword = pInitPasswordText;
       if(pCheckText)
              m_csCheckBoxText = pCheckText;
}
CPromptPasswordDialog::CPromptPasswordDialog ( CWnd *  pParent,
const TCHAR pTitle,
const TCHAR pText,
const TCHAR pInitPasswordText,
BOOL  bHasCheck,
const TCHAR pCheckText,
int  initCheckVal 
)

Definition at line 118 of file Dialogs.cpp.

    : CDialog(CPromptPasswordDialog::IDD, pParent),
    m_bHasCheckBox(bHasCheck), m_bCheckBoxValue(initCheckVal)
{   
       if(pTitle)
              m_csDialogTitle = pTitle;
       if(pText)
              m_csPromptText = pText;
       if(pInitPasswordText)
           m_csPassword = pInitPasswordText;
       if(pCheckText)
              m_csCheckBoxText = pCheckText;
}

Member Function Documentation

virtual void CPromptPasswordDialog::DoDataExchange ( CDataExchange *  pDX) [protected, virtual]
void CPromptPasswordDialog::DoDataExchange ( CDataExchange *  pDX) [protected, virtual]

Definition at line 141 of file Dialogs.cpp.

{
    CDialog::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CPromptPasswordDialog)
    DDX_Text(pDX, IDC_PASSWORD, m_csPassword);
    DDX_Check(pDX, IDC_CHECK_SAVE_PASSWORD, m_bCheckBoxValue);
    //}}AFX_DATA_MAP
}
virtual BOOL CPromptPasswordDialog::OnInitDialog ( ) [protected, virtual]
int CPromptPasswordDialog::OnInitDialog ( ) [protected, virtual]

Definition at line 156 of file Dialogs.cpp.

{   
    SetWindowText(m_csDialogTitle);
  
    CWnd *pWnd = GetDlgItem(IDC_PROMPT_TEXT);
    if(pWnd)
        pWnd->SetWindowText(m_csPromptText);

    CButton *pChk = (CButton *)GetDlgItem(IDC_CHECK_SAVE_PASSWORD);
    if(pChk)
    {
        if (m_bHasCheckBox)
        {
            if(!m_csCheckBoxText.IsEmpty())
                pChk->SetWindowText(m_csCheckBoxText);
            pChk->SetCheck(m_bCheckBoxValue ? BST_CHECKED : BST_UNCHECKED);
        }
        else
        {
            // Hide the check box control if there's no label text
            // This will be the case when we're not using single sign-on
            pChk->ShowWindow(SW_HIDE); 
        }
    }

    CEdit *pEdit = (CEdit *)GetDlgItem(IDC_PASSWORD);
    if(pEdit) 
    {
        pEdit->SetFocus();

        return 0; // Returning "0" since we're explicitly setting focus
    }

    return TRUE;
}

Member Data Documentation

Definition at line 88 of file Dialogs.h.

Definition at line 86 of file Dialogs.h.

Definition at line 87 of file Dialogs.h.

Definition at line 83 of file Dialogs.h.

Definition at line 85 of file Dialogs.h.

Definition at line 84 of file Dialogs.h.


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