Back to index

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

#include <Dialogs.h>

Collaboration diagram for CConfirmCheckDialog:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { IDD = IDD_CONFIRM_CHECK_DIALOG }
enum  { IDD = IDD_CONFIRM_CHECK_DIALOG }

Public Member Functions

 CConfirmCheckDialog (CWnd *pParent, const char *pTitle, const char *pText, const char *pCheckText, int initCheckVal, const char *pBtn1Text, const char *pBtn2Text, const char *pBtn3Text)
 CConfirmCheckDialog (CWnd *pParent, const TCHAR *pTitle, const TCHAR *pText, const TCHAR *pCheckText, int initCheckVal, const TCHAR *pBtn1Text, const TCHAR *pBtn2Text, const TCHAR *pBtn3Text)

Public Attributes

CString m_csDialogTitle
CString m_csMsgText
CString m_csCheckBoxText
int m_bCheckBoxValue
CString m_csBtn1Text
CString m_csBtn2Text
CString m_csBtn3Text

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
virtual BOOL OnInitDialog ()
afx_msg void OnBtn1Clicked ()
afx_msg void OnBtn2Clicked ()
afx_msg void OnBtn3Clicked ()
virtual void DoDataExchange (CDataExchange *pDX)
virtual BOOL OnInitDialog ()
afx_msg void OnBtn1Clicked ()
afx_msg void OnBtn2Clicked ()
afx_msg void OnBtn3Clicked ()

Detailed Description

Definition at line 162 of file Dialogs.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
IDD 

Definition at line 171 of file Dialogs.h.

anonymous enum
Enumerator:
IDD 

Definition at line 164 of file Dialogs.h.


Constructor & Destructor Documentation

CConfirmCheckDialog::CConfirmCheckDialog ( CWnd *  pParent,
const char *  pTitle,
const char *  pText,
const char *  pCheckText,
int  initCheckVal,
const char *  pBtn1Text,
const char *  pBtn2Text,
const char *  pBtn3Text 
)

Definition at line 327 of file Dialogs.cpp.

            : CDialog(CConfirmCheckDialog::IDD, pParent)
{   
    if(pTitle)
        m_csDialogTitle = pTitle;
    if(pText)
        m_csMsgText = pText;
    if(pCheckText)
        m_csCheckBoxText = pCheckText; 

    m_bCheckBoxValue = initCheckVal;

    if(pBtn1Text)
        m_csBtn1Text = pBtn1Text;
    if(pBtn2Text)
        m_csBtn2Text = pBtn2Text;
    if(pBtn3Text)
        m_csBtn3Text = pBtn3Text;
}
CConfirmCheckDialog::CConfirmCheckDialog ( CWnd *  pParent,
const TCHAR pTitle,
const TCHAR pText,
const TCHAR pCheckText,
int  initCheckVal,
const TCHAR pBtn1Text,
const TCHAR pBtn2Text,
const TCHAR pBtn3Text 
)

Definition at line 320 of file Dialogs.cpp.

            : CDialog(CConfirmCheckDialog::IDD, pParent)
{   
    if(pTitle)
        m_csDialogTitle = pTitle;
    if(pText)
        m_csMsgText = pText;
    if(pCheckText)
        m_csCheckBoxText = pCheckText; 

    m_bCheckBoxValue = initCheckVal;

    if(pBtn1Text)
        m_csBtn1Text = pBtn1Text;
    if(pBtn2Text)
        m_csBtn2Text = pBtn2Text;
    if(pBtn3Text)
        m_csBtn3Text = pBtn3Text;
}

Member Function Documentation

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

Definition at line 350 of file Dialogs.cpp.

{
    CDialog::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CConfirmCheckDialog)
    DDX_Check(pDX, IDC_CHECKBOX, m_bCheckBoxValue);
    //}}AFX_DATA_MAP
}
afx_msg void CConfirmCheckDialog::OnBtn1Clicked ( ) [protected]

Definition at line 418 of file Dialogs.cpp.

{
    UpdateData();

    EndDialog(0); // where 0 indicates that the btn pressed was at index 0
}
afx_msg void CConfirmCheckDialog::OnBtn2Clicked ( ) [protected]

Definition at line 425 of file Dialogs.cpp.

{
    UpdateData();

    EndDialog(1); // where 1 indicates that the btn pressed was at index 1
}
afx_msg void CConfirmCheckDialog::OnBtn3Clicked ( ) [protected]

Definition at line 432 of file Dialogs.cpp.

{
    UpdateData();

    EndDialog(2); // where 2 indicates that the btn pressed was at index 2
}
virtual BOOL CConfirmCheckDialog::OnInitDialog ( ) [protected, virtual]
int CConfirmCheckDialog::OnInitDialog ( ) [protected, virtual]

Definition at line 366 of file Dialogs.cpp.

{   
       SetWindowText(m_csDialogTitle);
  
    CWnd *pWnd = GetDlgItem(IDC_MSG_TEXT);
    if(pWnd)
        pWnd->SetWindowText(m_csMsgText);

    CButton *pChk = (CButton *)GetDlgItem(IDC_CHECKBOX);
    if(pChk)
    {
        if(m_csCheckBoxText.IsEmpty())
        {
            pChk->ShowWindow(SW_HIDE);
        }
        else
        {
            pChk->SetWindowText(m_csCheckBoxText);
            pChk->SetCheck(m_bCheckBoxValue ? BST_CHECKED : BST_UNCHECKED);
        }
    }

    CButton *pBtn1 = (CButton *)GetDlgItem(IDC_BTN1);
    if(pBtn1)
    {
        if(m_csBtn1Text.IsEmpty())
            pBtn1->ShowWindow(SW_HIDE);
        else
            pBtn1->SetWindowText(m_csBtn1Text);
    }

    CButton *pBtn2 = (CButton *)GetDlgItem(IDC_BTN2);
    if(pBtn2)
    {
        if(m_csBtn2Text.IsEmpty())
            pBtn2->ShowWindow(SW_HIDE);
        else
            pBtn2->SetWindowText(m_csBtn2Text);
    }

    CButton *pBtn3 = (CButton *)GetDlgItem(IDC_BTN3);
    if(pBtn3)
    {
        if(m_csBtn3Text.IsEmpty())
            pBtn3->ShowWindow(SW_HIDE);
        else
            pBtn3->SetWindowText(m_csBtn3Text);
    }

    return TRUE;
}

Member Data Documentation

Definition at line 176 of file Dialogs.h.

Definition at line 177 of file Dialogs.h.

Definition at line 178 of file Dialogs.h.

Definition at line 179 of file Dialogs.h.

Definition at line 175 of file Dialogs.h.

Definition at line 173 of file Dialogs.h.

Definition at line 174 of file Dialogs.h.


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