นายสัตยา บานบัว 54030471 แขนงคอมพิวเตอร์
#include "sattayaphone.h"
CMyApp theApp; // create application objectaya
BOOL CMyApp::InitInstance()
{
m_pMainWnd = new CMyFrame(); // create windows frame object and link to application
m_pMainWnd->ShowWindow(m_nCmdShow); //show frame windows
m_pMainWnd->UpdateWindow(); // update frame windows
return TRUE;
}
CMyFrame::CMyFrame()
{
pmyEdit = new CEdit();
myButton = new CButton();
myButton1 = new CButton();
myButton2 = new CButton();
myButton3 = new CButton();
myButton4 = new CButton();
myButton5 = new CButton();
myButton6 = new CButton();
myButton7 = new CButton();
myButton8 = new CButton();
myButton9 = new CButton();
myButton10 = new CButton();
myButton11 = new CButton();
myButton12 = new CButton();
myButton13 = new CButton();
Create(NULL,"Sattaya54030471",
WS_OVERLAPPEDWINDOW, CRect(200,200,500,700));
// (4a) create EditBox control
pmyEdit->Create(
ES_RIGHT | ES_AUTOVSCROLL |
WS_VISIBLE | WS_BORDER |
ES_MULTILINE,
CRect(30,20,250,200),
this,
IDC_MYEDIT );
myButton->Create
("Call", WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(30,210,130,250), this, IDC_MYBUTTON );
myButton1->Create
("End",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(150,210,250,250), this, IDC_MYBUTTON );
myButton2->Create
("1",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(30,260,103.3,290), this, IDC_MYBUTTON );
myButton3->Create
("2",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(103.3,260,176.3,290), this, IDC_MYBUTTON );
myButton4->Create
("3",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(176.3,260,249.6,290), this, IDC_MYBUTTON );
myButton5->Create
("4",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(30,290,103.3,320), this, IDC_MYBUTTON );
myButton6->Create
("5",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(103.3,290,176.3,320), this, IDC_MYBUTTON );
myButton7->Create
("6",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(176.3,290,249.6,320), this, IDC_MYBUTTON );
myButton8->Create
("7",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(30,320,103.3,350), this, IDC_MYBUTTON );
myButton9->Create
("8",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(103,320,176.3,350), this, IDC_MYBUTTON );
myButton10->Create
("9",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(176.3,320,249.6,350), this, IDC_MYBUTTON );
myButton11->Create
("0",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(103.3,350,176.3,380), this, IDC_MYBUTTON );
myButton12->Create
("*",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(30,350,103.3,380), this, IDC_MYBUTTON );
myButton13->Create
("#",WS_CHILD | WS_VISIBLE |BS_PUSHBUTTON, CRect(176.3,350,249.6,380), this, IDC_MYBUTTON );
}
CMyFrame::~CMyFrame()
{
delete pmyEdit;
delete myButton;
delete myButton1;
delete myButton2;
delete myButton3;
delete myButton4;
delete myButton5;
delete myButton6;
delete myButton7;
delete myButton8;
delete myButton9;
delete myButton10;
delete myButton11;
delete myButton12;
delete myButton13;
}
#include <afxwin.h>
#include <afxdtctl.h>
#define IDC_MYEDIT 1000
#define IDC_MYBUTTON 1001
#define IDC_MYBUTTON1 1002
#define IDC_MYBUTTON2 1003
#define IDC_MYBUTTON3 1004
#define IDC_MYBUTTON4 1005
#define IDC_MYBUTTON5 1006
#define IDC_MYBUTTON6 1007
#define IDC_MYBUTTON7 1008
#define IDC_MYBUTTON8 1009
#define IDC_MYBUTTON9 10010
#define IDC_MYBUTTON10 10011
#define IDC_MYBUTTON11 10012
#define IDC_MYBUTTON12 10013
#define IDC_MYBUTTON13 10014
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
class CMyFrame : public CFrameWnd
{
public:
CMyFrame();
~CMyFrame();
CEdit *pmyEdit;
CButton *myButton;
CButton *myButton1;
CButton *myButton2;
CButton *myButton3;
CButton *myButton4;
CButton *myButton5;
CButton *myButton6;
CButton *myButton7;
CButton *myButton8;
CButton *myButton9;
CButton *myButton10;
CButton *myButton11;
CButton *myButton12;
CButton *myButton13;
};
ต่อมา ก็ จะได้ หน้า ตา ของโทรศัพท๋ที่เป็น แบบนี้
ไม่มีความคิดเห็น:
แสดงความคิดเห็น