|
Revision 5, 1.4 kB
(checked in by qbert, 6 years ago)
|
Initial ( and last :( ) commit
|
| Line | |
|---|
| 1 |
// AlertDlg.cpp : implementation file |
|---|
| 2 |
// |
|---|
| 3 |
|
|---|
| 4 |
#include "stdafx.h" |
|---|
| 5 |
#include "Elephant.h" |
|---|
| 6 |
#include "AlertDlg.h" |
|---|
| 7 |
|
|---|
| 8 |
#ifdef _DEBUG |
|---|
| 9 |
#define new DEBUG_NEW |
|---|
| 10 |
#undef THIS_FILE |
|---|
| 11 |
static char THIS_FILE[] = __FILE__; |
|---|
| 12 |
#endif |
|---|
| 13 |
|
|---|
| 14 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 15 |
// CAlertDlg dialog |
|---|
| 16 |
void CAlertDlg::SetMsg(const string& text) |
|---|
| 17 |
{ |
|---|
| 18 |
m_msg = text.c_str(); |
|---|
| 19 |
UpdateData(FALSE); |
|---|
| 20 |
|
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
CAlertDlg::CAlertDlg(CWnd* pParent /*=NULL*/) |
|---|
| 24 |
: CDialog(CAlertDlg::IDD, pParent) |
|---|
| 25 |
{ |
|---|
| 26 |
//{{AFX_DATA_INIT(CAlertDlg) |
|---|
| 27 |
m_msg = _T(""); |
|---|
| 28 |
//}}AFX_DATA_INIT |
|---|
| 29 |
} |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
void CAlertDlg::DoDataExchange(CDataExchange* pDX) |
|---|
| 33 |
{ |
|---|
| 34 |
CDialog::DoDataExchange(pDX); |
|---|
| 35 |
//{{AFX_DATA_MAP(CAlertDlg) |
|---|
| 36 |
DDX_Control(pDX, IDC_BUTTON1, m_ok); |
|---|
| 37 |
DDX_Text(pDX, IDC_STATIC1, m_msg); |
|---|
| 38 |
//}}AFX_DATA_MAP |
|---|
| 39 |
} |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
BEGIN_MESSAGE_MAP(CAlertDlg, CDialog) |
|---|
| 43 |
//{{AFX_MSG_MAP(CAlertDlg) |
|---|
| 44 |
ON_BN_CLICKED(IDC_BUTTON1, OnOk) |
|---|
| 45 |
//}}AFX_MSG_MAP |
|---|
| 46 |
END_MESSAGE_MAP() |
|---|
| 47 |
|
|---|
| 48 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 49 |
// CAlertDlg message handlers |
|---|
| 50 |
|
|---|
| 51 |
BOOL CAlertDlg::OnInitDialog() |
|---|
| 52 |
{ |
|---|
| 53 |
CDialog::OnInitDialog(); |
|---|
| 54 |
|
|---|
| 55 |
SetupButton(&m_ok); |
|---|
| 56 |
|
|---|
| 57 |
SetIcon(AfxGetApp()->LoadIcon(IDR_ELEPHANT) ,true); |
|---|
| 58 |
|
|---|
| 59 |
return TRUE; // return TRUE unless you set the focus to a control |
|---|
| 60 |
// EXCEPTION: OCX Property Pages should return FALSE |
|---|
| 61 |
} |
|---|
| 62 |
|
|---|
| 63 |
void CAlertDlg::OnOk() |
|---|
| 64 |
{ |
|---|
| 65 |
EndDialog(0); // TODO: Add your control notification handler code here |
|---|
| 66 |
|
|---|
| 67 |
} |
|---|