ImageVerifierCode 换一换
格式:DOCX , 页数:16 ,大小:17.59KB ,
资源ID:4383102      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/4383102.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(VC++程序代码.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

VC++程序代码.docx

1、VC+程序代码/ ButtonTestDlg.cpp : implementation file/#include stdafx.h#include ButtonTest.h#include ButtonTestDlg.h#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE = _FILE_;#endif/ CAboutDlg dialog used for App Aboutclass CAboutDlg : public CDialogpublic: CAboutDlg();/ Dialog Data

2、 /AFX_DATA(CAboutDlg) enum IDD = IDD_ABOUTBOX ; /AFX_DATA / ClassWizard generated virtual function overrides /AFX_VIRTUAL(CAboutDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); / DDX/DDV support /AFX_VIRTUAL/ Implementationprotected: /AFX_MSG(CAboutDlg) /AFX_MSG DECLARE_MESSAGE_MAP()

3、;CAboutDlg:CAboutDlg() : CDialog(CAboutDlg:IDD) /AFX_DATA_INIT(CAboutDlg) /AFX_DATA_INITvoid CAboutDlg:DoDataExchange(CDataExchange* pDX) CDialog:DoDataExchange(pDX); /AFX_DATA_MAP(CAboutDlg) /AFX_DATA_MAPBEGIN_MESSAGE_MAP(CAboutDlg, CDialog) /AFX_MSG_MAP(CAboutDlg) / No message handlers /AFX_MSG_MA

4、PEND_MESSAGE_MAP()/ CButtonTestDlg dialogCButtonTestDlg:CButtonTestDlg(CWnd* pParent /*=NULL*/) : CDialog(CButtonTestDlg:IDD, pParent) /AFX_DATA_INIT(CButtonTestDlg) m_A1 = FALSE; m_A2 = FALSE; m_A3 = FALSE; m_A4 = FALSE; m_B1 = FALSE; m_B2 = FALSE; m_B3 = FALSE; m_B4 = FALSE; m_B5 = FALSE; m_result

5、 = _T(提示:按“获取信息”键即可获取您的相关信息!); m_name = _T(请输入您的名字); m_hometown = _T(请输入您的籍贯); m_address = _T(请输入您的住址); m_C1 = FALSE; m_C2 = FALSE; m_C3 = FALSE; m_C4 = FALSE; m_C5 = FALSE; m_C6 = FALSE; m_C7 = FALSE; m_C8 = FALSE; m_C9 = FALSE; m_A5 = FALSE; m_A6 = FALSE; m_B6 = FALSE; /AFX_DATA_INIT / Note that L

6、oadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()-LoadIcon(IDR_MAINFRAME);void CButtonTestDlg:DoDataExchange(CDataExchange* pDX) CDialog:DoDataExchange(pDX); /AFX_DATA_MAP(CButtonTestDlg) DDX_Control(pDX, IDC_COMBO11, m_age); DDX_Control(pDX, IDC_COMBO9, m_bloodtype);

7、DDX_Control(pDX, IDC_COMBO8, m_nation); DDX_Control(pDX, IDC_COMBO10, m_marriage); DDX_Control(pDX, IDC_COMBO7, m_constellation); DDX_Control(pDX, IDC_COMBO6, m_animalsign); DDX_Control(pDX, IDC_COMBO5, m_date); DDX_Control(pDX, IDC_COMBO4, m_month); DDX_Control(pDX, IDC_COMBO3, m_year); DDX_Check(p

8、DX, IDC_CHECK1, m_A1); DDX_Check(pDX, IDC_CHECK2, m_A2); DDX_Check(pDX, IDC_CHECK3, m_A3); DDX_Check(pDX, IDC_CHECK4, m_A4); DDX_Check(pDX, IDC_CHECK5, m_B1); DDX_Check(pDX, IDC_CHECK6, m_B2); DDX_Check(pDX, IDC_CHECK7, m_B3); DDX_Check(pDX, IDC_CHECK8, m_B4); DDX_Check(pDX, IDC_CHECK9, m_B5); DDX_T

9、ext(pDX, IDC_EDITSHOW, m_result); DDX_Text(pDX, IDC_EDIT1, m_name); DDX_Text(pDX, IDC_EDIT2, m_hometown); DDX_Text(pDX, IDC_EDIT6, m_address); DDX_Check(pDX, IDC_CHECK11, m_C1); DDX_Check(pDX, IDC_CHECK12, m_C2); DDX_Check(pDX, IDC_CHECK13, m_C3); DDX_Check(pDX, IDC_CHECK14, m_C4); DDX_Check(pDX, ID

10、C_CHECK15, m_C5); DDX_Check(pDX, IDC_CHECK16, m_C6); DDX_Check(pDX, IDC_CHECK17, m_C7); DDX_Check(pDX, IDC_CHECK18, m_C8); DDX_Check(pDX, IDC_CHECK19, m_C9); DDX_Check(pDX, IDC_CHECK20, m_A5); DDX_Check(pDX, IDC_CHECK21, m_A6); DDX_Check(pDX, IDC_CHECK22, m_B6); /AFX_DATA_MAPBEGIN_MESSAGE_MAP(CButto

11、nTestDlg, CDialog) /AFX_MSG_MAP(CButtonTestDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_CHECK1, OnCheck1) ON_BN_CLICKED(IDC_CHECK2, OnCheck2) ON_BN_CLICKED(IDC_CHECK3, OnCheck3) ON_BN_CLICKED(IDC_CHECK4, OnCheck4) ON_BN_CLICKED(IDC_CHECK5, OnCheck5) ON_BN_CLICKED(IDC

12、_CHECK6, OnCheck6) ON_BN_CLICKED(IDC_CHECK7, OnCheck7) ON_BN_CLICKED(IDC_CHECK8, OnCheck8) ON_BN_CLICKED(IDC_CHECK9, OnCheck9) ON_BN_CLICKED(IDC_BUTTONSHOW, OnButtonshow) ON_BN_CLICKED(IDC_CHECK11, OnCheck11) ON_BN_CLICKED(IDC_CHECK12, OnCheck12) ON_BN_CLICKED(IDC_CHECK13, OnCheck13) ON_BN_CLICKED(I

13、DC_CHECK14, OnCheck14) ON_BN_CLICKED(IDC_CHECK15, OnCheck15) ON_BN_CLICKED(IDC_CHECK16, OnCheck16) ON_BN_CLICKED(IDC_CHECK17, OnCheck17) ON_BN_CLICKED(IDC_CHECK18, OnCheck18) ON_BN_CLICKED(IDC_CHECK19, OnCheck19) ON_BN_CLICKED(IDC_CHECK20, OnCheck20) ON_BN_CLICKED(IDC_CHECK21, OnCheck21) ON_BN_CLICK

14、ED(IDC_CHECK22, OnCheck22) /AFX_MSG_MAPEND_MESSAGE_MAP()/ CButtonTestDlg message handlersBOOL CButtonTestDlg:OnInitDialog() CDialog:OnInitDialog(); CheckRadioButton(IDC_RADIO1,IDC_RADIO4,IDC_RADIO1); CheckRadioButton(IDC_RADIO5,IDC_RADIO6,IDC_RADIO5); CheckRadioButton(IDC_RADIO7,IDC_RADIO20,IDC_RADI

15、O7); CheckRadioButton(IDC_RADIO21,IDC_RADIO27,IDC_RADIO27); CheckRadioButton(IDC_RADIO28,IDC_RADIO34,IDC_RADIO30); / Add About. menu item to system menu. / IDM_ABOUTBOX must be in the system command range. ASSERT(IDM_ABOUTBOX & 0xFFF0) = IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX AppendMenu(MF_SEPARATOR); p

16、SysMenu-AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); / Set the icon for this dialog. The framework does this automatically / when the applications main window is not a dialog SetIcon(m_hIcon, TRUE); / Set big icon SetIcon(m_hIcon, FALSE); / Set small icon / TODO: Add extra initialization here

17、return TRUE; / return TRUE unless you set the focus to a controlvoid CButtonTestDlg:OnSysCommand(UINT nID, LPARAM lParam) if (nID & 0xFFF0) = IDM_ABOUTBOX) CAboutDlg dlgAbout; dlgAbout.DoModal(); else CDialog:OnSysCommand(nID, lParam); / If you add a minimize button to your dialog, you will need the

18、 code below/ to draw the icon. For MFC applications using the document/view model,/ this is automatically done for you by the framework.void CButtonTestDlg:OnPaint() if (IsIconic() CPaintDC dc(this); / device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); / Center

19、icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; / Draw the icon dc.DrawIcon(x, y, m_hIcon); else CDialog:OnPaint(); / The

20、system calls this to obtain the cursor to display while the user drags/ the minimized window.HCURSOR CButtonTestDlg:OnQueryDragIcon() return (HCURSOR) m_hIcon;void CButtonTestDlg:OnCheck1() if(m_A1) m_A1=false; else m_A1=true; / TODO: Add your control notification handler code here void CButtonTestD

21、lg:OnCheck2() if(m_A2) m_A2=false; else m_A2=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck3() if(m_A3) m_A3=false; else m_A3=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck4() if(m_A4) m_A4=false; else m_A4=true; /

22、 TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck20() if(m_A5) m_A5=false; else m_A5=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck21() if(m_A6) m_A6=false; else m_A6=true; / TODO: Add your control notification handler code

23、here void CButtonTestDlg:OnCheck5() if(m_B1) m_B1=false; else m_B1=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck6() if(m_B2) m_B2=false; else m_B2=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck7() if(m_B3) m_B3=fa

24、lse; else m_B3=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck8() if(m_B4) m_B4=false; else m_B4=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck9() if(m_B5) m_B5=false; else m_B5=true; / TODO: Add your control notifi

25、cation handler code here void CButtonTestDlg:OnCheck22() if(m_B6) m_B6=false; else m_B6=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck11() if(m_C1) m_C1=false; else m_C1=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnChe

26、ck12() if(m_C2) m_C2=false; else m_C2=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck13() if(m_C3) m_C3=false; else m_C3=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck14() if(m_C4) m_C4=false; else m_C4=true; / TODO

27、: Add your control notification handler code here void CButtonTestDlg:OnCheck15() if(m_C5) m_C5=false; else m_C5=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck16() if(m_C6) m_C6=false; else m_C6=true; / TODO: Add your control notification handler code here

28、void CButtonTestDlg:OnCheck17() if(m_C7) m_C7=false; else m_C7=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck18() if(m_C8) m_C8=false; else m_C8=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnCheck19() if(m_C9) m_C9=false; else m_C9=true; / TODO: Add your control notification handler code here void CButtonTestDlg:OnButtonshow()

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1