root/trunk/GetText.cpp

Revision 5, 1.4 kB (checked in by qbert, 6 years ago)

Initial ( and last :( ) commit

Line 
1 // GetText.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "Elephant.h"
6 #include "GetText.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 // CGetText dialog
16
17
18 CGetText::CGetText(CWnd* pParent /*=NULL*/)
19     : CDialog(CGetText::IDD, pParent)
20 {
21     //{{AFX_DATA_INIT(CGetText)
22     m_csText = _T("");
23     //}}AFX_DATA_INIT
24 }
25
26
27 void CGetText::DoDataExchange(CDataExchange* pDX)
28 {
29     CDialog::DoDataExchange(pDX);
30     //{{AFX_DATA_MAP(CGetText)
31     DDX_Control(pDX, IDOK, m_ok);
32     DDX_Control(pDX, IDCANCEL, m_cancel);
33     DDX_Control(pDX, IDC_EDIT1, m_text);
34     DDX_Text(pDX, IDC_EDIT1, m_csText);
35     //}}AFX_DATA_MAP
36 }
37
38
39 BEGIN_MESSAGE_MAP(CGetText, CDialog)
40     //{{AFX_MSG_MAP(CGetText)
41     //}}AFX_MSG_MAP
42 END_MESSAGE_MAP()
43
44 /////////////////////////////////////////////////////////////////////////////
45 // CGetText message handlers
46
47 BOOL CGetText::OnInitDialog()
48 {
49     CDialog::OnInitDialog();
50     SetWindowText(title.c_str() );
51     m_text.DisableFlatLook(false);
52
53     SetupButton(&m_cancel);
54     SetupButton(&m_ok);
55    
56     return TRUE;  // return TRUE unless you set the focus to a control
57                   // EXCEPTION: OCX Property Pages should return FALSE
58 }
59
60 void CGetText::OnOK()
61 {
62     UpdateData();
63     EndDialog(1);   // TODO: Add extra validation here
64    
65    
66 }
67
68 void CGetText::OnCancel()
69 {
70     EndDialog(0)    ;
71    
72 }
Note: See TracBrowser for help on using the browser.