Back to index

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

#include <Dialogs.h>

Collaboration diagram for CPromptUsernamePasswordDialog:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { IDD = IDD_PROMPT_USERPASS_DIALOG }
enum  { IDD = IDD_PROMPT_USERPASS_DIALOG }

Public Member Functions

 CPromptUsernamePasswordDialog (CWnd *pParent, const char *pTitle, const char *pText, const char *pInitUsername, const char *pInitPassword, BOOL bHasCheck, const char *pCheckText, int initCheckVal)
 CPromptUsernamePasswordDialog (CWnd *pParent, const TCHAR *pTitle, const TCHAR *pText, const TCHAR *pInitUsername, const TCHAR *pInitPassword, BOOL bHasCheck, const TCHAR *pCheckText, int initCheckVal)

Public Attributes

CString m_csDialogTitle
CString m_csPromptText
CString m_csUserNameLabel
CString m_csPasswordLabel
CString m_csPassword
CString m_csUserName
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 102 of file Dialogs.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
IDD 

Definition at line 110 of file Dialogs.h.

anonymous enum
Enumerator:
IDD 

Definition at line 103 of file Dialogs.h.


Constructor & Destructor Documentation

CPromptUsernamePasswordDialog::CPromptUsernamePasswordDialog ( CWnd *  pParent,
const char *  pTitle,
const char *  pText,
const char *  pInitUsername,
const char *  pInitPassword,
BOOL  bHasCheck,
const char *  pCheckText,
int  initCheckVal 
)

Definition at line 196 of file Dialogs.cpp.

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

Definition at line 189 of file Dialogs.cpp.

    : CDialog(CPromptUsernamePasswordDialog::IDD, pParent),
    m_bHasCheckBox(bHasCheck), m_bCheckBoxValue(initCheckVal)
{
    if(pTitle)
        m_csDialogTitle = pTitle;
    if(pText)
        m_csPromptText = pText;
    if(pInitUsername)
        m_csUserName = pInitUsername;
    if(pInitPassword)
        m_csPassword = pInitPassword;
    if(pCheckText)
        m_csCheckBoxText = pCheckText;
}

Member Function Documentation

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

Definition at line 214 of file Dialogs.cpp.

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

Definition at line 230 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
        {
            pChk->ShowWindow(SW_HIDE);
        }
    }

    CEdit *pEdit = (CEdit *)GetDlgItem(IDC_PASSWORD);
    if(pEdit) 
    {
        pEdit->SetWindowText(m_csPassword);
    }

    pEdit = (CEdit *)GetDlgItem(IDC_USERNAME);
    if(pEdit) 
    {
        pEdit->SetWindowText(m_csUserName);
        pEdit->SetSel(0, -1);

        pEdit->SetFocus();

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

    return TRUE;
}

Member Data Documentation

Definition at line 120 of file Dialogs.h.

Definition at line 118 of file Dialogs.h.

Definition at line 119 of file Dialogs.h.

Definition at line 112 of file Dialogs.h.

Definition at line 116 of file Dialogs.h.

Definition at line 115 of file Dialogs.h.

Definition at line 113 of file Dialogs.h.

Definition at line 117 of file Dialogs.h.

Definition at line 114 of file Dialogs.h.


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