資源描述:
《mfc各控件的應(yīng)用》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、//MagDlg.cpp:implementationfile//#include"stdafx.h"#include"Mag.h"#include"MagDlg.h"#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[]=__FILE__;#endif///////////////////////////////////////////////////////////////////////////////CAboutDlgdialogu
2、sedforAppAboutclassCAboutDlg:publicCDialog{public:CAboutDlg();//DialogData//{{AFX_DATA(CAboutDlg)enum{IDD=IDD_ABOUTBOX};//}}AFX_DATA//ClassWizardgeneratedvirtualfunctionoverrides//{{AFX_VIRTUAL(CAboutDlg)protected:virtualvoidDoDataExchange(CDataExchange*pDX);//D
3、DX/DDVsupport//}}AFX_VIRTUAL//Implementationprotected://{{AFX_MSG(CAboutDlg)//}}AFX_MSGDECLARE_MESSAGE_MAP()};CAboutDlg::CAboutDlg():CDialog(CAboutDlg::IDD){//{{AFX_DATA_INIT(CAboutDlg)//}}AFX_DATA_INIT}voidCAboutDlg::DoDataExchange(CDataExchange*pDX){CDialog::D
4、oDataExchange(pDX);//{{AFX_DATA_MAP(CAboutDlg)//}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CAboutDlg,CDialog)//{{AFX_MSG_MAP(CAboutDlg)//Nomessagehandlers//}}AFX_MSG_MAPEND_MESSAGE_MAP()///////////////////////////////////////////////////////////////////////////////CMagDlg
5、dialogCMagDlg::CMagDlg(CWnd*pParent/*=NULL*/):CDialog(CMagDlg::IDD,pParent){//{{AFX_DATA_INIT(CMagDlg)//m_Address=-1;m_Hobby1=FALSE;m_Hobby2=FALSE;m_Hobby3=FALSE;//}}AFX_DATA_INIT//NotethatLoadIcondoesnotrequireasubsequentDestroyIconinWin32m_hIcon=AfxGetApp()->L
6、oadIcon(IDR_MAINFRAME);m_Address=0;//選西安1北京2上海}voidCMagDlg::DoDataExchange(CDataExchange*pDX){CDialog::DoDataExchange(pDX);//{{AFX_DATA_MAP(CMagDlg)DDX_Control(pDX,IDC_EDIT3,m_edit3);DDX_Control(pDX,IDC_EDIT2,m_edit2);DDX_Control(pDX,IDC_EDIT1,m_edit1);DDX_Contr
7、ol(pDX,IDC_BUTTON2,m_Clear);DDX_Control(pDX,IDC_BUTTON1,m_Add);DDX_Control(pDX,IDC_LIST1,m_List);DDX_Control(pDX,IDC_COMBOX,m_combox);DDX_Radio(pDX,IDC_RADIO1,m_Address);DDX_Check(pDX,IDC_CHECK1,m_Hobby1);DDX_Check(pDX,IDC_CHECK2,m_Hobby2);DDX_Check(pDX,IDC_CHEC
8、K3,m_Hobby3);//}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CMagDlg,CDialog)//{{AFX_MSG_MAP(CMagDlg)ON_WM_SYSCOMMAND()ON_WM_PAINT()ON_WM_QUERYDRAGICON()ON_BN_CLICKED(IDC_RADIO1,O