/[projects]/SodukuSolver/test1/EnterNumber.cpp
ViewVC logotype

Contents of /SodukuSolver/test1/EnterNumber.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 226 - (show annotations) (download)
Mon Jun 15 11:06:35 2009 UTC (14 years, 11 months ago) by torben
File size: 989 byte(s)


1 // EnterNumber.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "test1.h"
6 #include "EnterNumber.h"
7 #include ".\enternumber.h"
8
9
10 // EnterNumber dialog
11
12 IMPLEMENT_DYNAMIC(EnterNumber, CDialog)
13 EnterNumber::EnterNumber(CWnd* pParent /*=NULL*/)
14 : CDialog(EnterNumber::IDD, pParent)
15 , m_number(0)
16 {
17
18 }
19
20 EnterNumber::~EnterNumber()
21 {
22 }
23
24 void EnterNumber::DoDataExchange(CDataExchange* pDX)
25 {
26 CDialog::DoDataExchange(pDX);
27 DDX_Text(pDX, IDC_EDIT1, m_number);
28 DDV_MinMaxInt(pDX, m_number, 0, 9);
29 }
30
31
32 BEGIN_MESSAGE_MAP(EnterNumber, CDialog)
33 ON_WM_PAINT()
34 END_MESSAGE_MAP()
35
36
37 // EnterNumber message handlers
38
39
40 int EnterNumber::number()
41 {
42 return m_number;
43 }
44 void EnterNumber::OnPaint()
45 {
46 CPaintDC dc(this); // device context for painting
47 // TODO: Add your message handler code here
48 // Do not call CDialog::OnPaint() for painting messages
49 CEdit *edit = (CEdit *) GetDlgItem(IDC_EDIT1);
50 edit->SetFocus();
51 edit->SetSel(0,1);
52 }

  ViewVC Help
Powered by ViewVC 1.1.20