第一范文网 - 专业文章范例文档资料分享平台

C++课程设计报告模板

来源:用户分享 时间:2025/5/30 14:18:56 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

青岛理工大学毕业论文(设计)

BEGIN_MESSAGE_MAP(CMobile_listDlg, CDialog) //{{AFX_MSG_MAP(CMobile_listDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT()

ON_WM_QUERYDRAGICON()

ON_BN_CLICKED(IDC_BUTTONadd, OnBUTTONadd) ON_BN_CLICKED(IDC_BUTTONmodify, OnBUTTONmodify) ON_BN_CLICKED(IDC_BUTTONdelete, OnBUTTONdelete) ON_BN_CLICKED(IDC_BUTTONsort, OnBUTTONsort) ON_BN_CLICKED(IDC_BUTTONsearch, OnBUTTONsearch) ON_BN_CLICKED(IDC_BUTTONsave, OnBUTTONsave) ON_BN_CLICKED(IDC_BUTTONdisplay, OnBUTTONdisplay) ON_COMMAND(IDM_ABOUT, OnAbout)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

///////////////////////////////////////////////////////////////////////////// // CMobile_listDlg message handlers

BOOL CMobile_listDlg::OnInitDialog() { CDialog::OnInitDialog();

// Add \

m_list.InsertColumn(0,\姓名\

m_list.InsertColumn(1,\手机号\21

//添加“姓名”列//添加“电话”列

青岛理工大学毕业论文(设计)

m_list.InsertColumn(2,\办公电话\

//

“phone”列

CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) {

CString strAboutMenu;

strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) {

pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING,

IDM_ABOUTBOX,

// IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000);

strAboutMenu);

}

}

// Set the icon for this dialog. The framework does this automatically // when the application's 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

return TRUE; // return TRUE unless you set the focus to a control

22

青岛理工大学毕业论文(设计)

}

void CMobile_listDlg::OnSysCommand(UINT nID, LPARAM lParam) { }

// If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework.

void CMobile_listDlg::OnPaint() {

23

if ((nID & 0xFFF0) == IDM_ABOUTBOX) { } else { }

CDialog::OnSysCommand(nID, lParam); CAboutDlg dlgAbout; dlgAbout.DoModal();

if (IsIconic()) {

CPaintDC dc(this); // device context for painting

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

青岛理工大学毕业论文(设计)

}

// The system calls this to obtain the cursor to display while the user drags // the minimized window.

HCURSOR CMobile_listDlg::OnQueryDragIcon() { }

void CMobile_listDlg::OnBUTTONadd() {

// Center 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;

} else { }

// Draw the icon

dc.DrawIcon(x, y, m_hIcon);

CDialog::OnPaint();

return (HCURSOR) m_hIcon;

// TODO: Add your control notification handler code here

24

搜索更多关于: C++课程设计报告模板 的文档
C++课程设计报告模板.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c9n83a2ylug5v45r563mn_6.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top