#include <MessageBoxDLG.h>
Public Types | |
| enum | { IDD = IDD_MESG_BOX } |
Public Member Functions | |
| CMessageBoxDLG (LPCTSTR tn=NULL, CWnd *pParent=NULL) | |
| CMessageBoxDLG (UINT nIDTemplate, LPCTSTR tn=NULL, CWnd *pParent=NULL) | |
| virtual | ~CMessageBoxDLG () |
| BOOL | OnInitDialog () |
| void | Display (LPCTSTR mesg=NULL) |
| void | Destory (void) |
| bool | isCanceled () |
| afx_msg void | OnStnClickedMesgBoxText () |
| virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam) |
Public Attributes | |
| CWnd * | pWnd |
| UINT | dialogID |
| CString | title |
| CStatic * | message |
| bool | cancel |
Protected Member Functions | |
| virtual void | DoDataExchange (CDataExchange *pDX) |
Definition at line 17 of file MessageBoxDLG.h.
| anonymous enum |
| CMessageBoxDLG | ( | LPCTSTR | tn = NULL, |
|
| CWnd * | pParent = NULL | |||
| ) |
Definition at line 22 of file MessageBoxDLG.cpp.
References CMessageBoxDLG::cancel, CMessageBoxDLG::dialogID, CMessageBoxDLG::IDD, CMessageBoxDLG::message, CMessageBoxDLG::pWnd, and CMessageBoxDLG::title.
00023 : CDialog(CMessageBoxDLG::IDD, pParent) 00024 { 00025 //{{AFX_DATA_INIT(CMessageBoxDLG) 00026 //}}AFX_DATA_INIT 00027 00028 dialogID = CMessageBoxDLG::IDD; 00029 pWnd = pParent; 00030 title = tn; 00031 message = NULL; 00032 cancel = false; 00033 // 00034 Create(dialogID, pWnd); 00035 }
| CMessageBoxDLG | ( | UINT | nIDTemplate, | |
| LPCTSTR | tn = NULL, |
|||
| CWnd * | pParent = NULL | |||
| ) |
Definition at line 39 of file MessageBoxDLG.cpp.
References CMessageBoxDLG::cancel, CMessageBoxDLG::dialogID, CMessageBoxDLG::message, CMessageBoxDLG::pWnd, and CMessageBoxDLG::title.
| ~CMessageBoxDLG | ( | ) | [virtual] |
Definition at line 53 of file MessageBoxDLG.cpp.
References CMessageBoxDLG::Destory().
00054 { 00055 Destory(); 00056 }

| void Destory | ( | void | ) |
Definition at line 112 of file MessageBoxDLG.cpp.
Referenced by CMessageBoxDLG::~CMessageBoxDLG().

| void Display | ( | LPCTSTR | mesg = NULL |
) |
Definition at line 90 of file MessageBoxDLG.cpp.
References CMessageBoxDLG::message, CMessageBoxDLG::pWnd, and CMessageBoxDLG::title.
Referenced by jbxwl::MessageBoxDLG().
00091 { 00092 if (pWnd!=NULL) { 00093 RECT rect; 00094 pWnd->GetWindowRect(&rect); 00095 int sx = (rect.left+rect.right)/2; 00096 int sy = (rect.top+rect.bottom)/2; 00097 this->GetWindowRect(&rect); 00098 sx -= (rect.right-rect.left)/2; 00099 sy -= (rect.bottom-rect.top)/2; 00100 this->SetWindowPos(NULL, sx, sy, 0, 0, SWP_NOSIZE|SWP_NOZORDER); 00101 } 00102 ShowWindow(SW_SHOW); 00103 00104 if (!title.IsEmpty()) SetWindowText(title); 00105 if (message!=NULL && mesg!=NULL) message->SetWindowText(mesg); 00106 }

| void DoDataExchange | ( | CDataExchange * | pDX | ) | [protected, virtual] |
Definition at line 60 of file MessageBoxDLG.cpp.
00061 { 00062 CDialog::DoDataExchange(pDX); 00063 //{{AFX_DATA_MAP(CMessageBoxDLG) 00064 //}}AFX_DATA_MAP 00065 }
| bool isCanceled | ( | ) | [inline] |
Definition at line 37 of file MessageBoxDLG.h.
References CMessageBoxDLG::cancel.
00037 {return cancel;}
| BOOL OnCommand | ( | WPARAM | wParam, | |
| LPARAM | lParam | |||
| ) | [virtual] |
Definition at line 128 of file MessageBoxDLG.cpp.
References CMessageBoxDLG::cancel.
00129 { 00130 if (wParam==IDCANCEL) cancel = true; 00131 00132 return CDialog::OnCommand(wParam, lParam); 00133 }
| BOOL OnInitDialog | ( | ) |
Definition at line 80 of file MessageBoxDLG.cpp.
00081 { 00082 message = (CStatic*)GetDlgItem(IDC_MESG_BOX_TEXT); 00083 return TRUE; 00084 }
| void OnStnClickedMesgBoxText | ( | ) |
Definition at line 119 of file MessageBoxDLG.cpp.
| bool cancel |
Definition at line 24 of file MessageBoxDLG.h.
Referenced by CMessageBoxDLG::CMessageBoxDLG(), CMessageBoxDLG::isCanceled(), and CMessageBoxDLG::OnCommand().
| UINT dialogID |
Definition at line 21 of file MessageBoxDLG.h.
Referenced by CMessageBoxDLG::CMessageBoxDLG().
| CStatic* message |
Definition at line 23 of file MessageBoxDLG.h.
Referenced by CMessageBoxDLG::CMessageBoxDLG(), and CMessageBoxDLG::Display().
| CWnd* pWnd |
Definition at line 20 of file MessageBoxDLG.h.
Referenced by CMessageBoxDLG::CMessageBoxDLG(), and CMessageBoxDLG::Display().
| CString title |
Definition at line 22 of file MessageBoxDLG.h.
Referenced by CMessageBoxDLG::CMessageBoxDLG(), and CMessageBoxDLG::Display().
1.6.1