www.pudn.com > classSystem(c++).rar > UserFrameDlg.cpp


// UserFrameDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "ClassSystem.h" 
#include "UserFrameDlg.h" 
#include "UserNode.h" 
#include "UserChangePs.h" 
#include "UserEditDlg.h" 
 
extern CUserNode curUser; 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CUserFrameDlg dialog 
 
 
CUserFrameDlg::CUserFrameDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CUserFrameDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CUserFrameDlg) 
		// NOTE: the ClassWizard will add member initialization here 
	//}}AFX_DATA_INIT 
} 
 
 
void CUserFrameDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CUserFrameDlg) 
		// NOTE: the ClassWizard will add DDX and DDV calls here 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CUserFrameDlg, CDialog) 
	//{{AFX_MSG_MAP(CUserFrameDlg) 
	ON_COMMAND(IDD_USER_INFO, OnUserInfo) 
	ON_COMMAND(IDD_USER_CHANGEPS, OnUserChangeps) 
	ON_COMMAND(IDM_USER_EXIT, OnUserExit) 
	ON_COMMAND(IDD_USER_MODIFYINFO, OnUserModifyinfo) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CUserFrameDlg message handlers 
 
void CUserFrameDlg::OnUserInfo()  
{ 
	// TODO: Add your command handler code here 
	MessageBox("你好,"+curUser.m_name+" ,"+ 
				"你的资料如下: \n"+ 
				"学号:		"+curUser.m_account+"\n"+ 
				"真实姓名:	"+curUser.m_name+"\n"+ 
				"籍贯:		"+curUser.m_city+"\n"+ 
				"所在学院:	"+curUser.m_college+"\n"+ 
				"专业:		"+curUser.m_major+"\n"+ 
				"宿舍:		"+curUser.m_dormitory+"\n"+ 
				"联系电话:	"+curUser.m_phone+"\n"+ 
				"手机:		"+curUser.m_mobilephone+"\n"+ 
				"电子邮件:	"+curUser.m_email+"\n"+ 
				"家庭住址:	"+curUser.m_homeAddress+"\n"+ 
				"邮政编码:	"+curUser.m_postNumber+"\n"+ 
				"四级成绩:	"+curUser.m_CET4+"\n"+ 
				"六级成绩:	"+curUser.m_CET6+"\n"+ 
				"个人简介:	"+curUser.m_description+"\n" 
 
				); 
 
  } 
 
void CUserFrameDlg::OnUserChangeps()  
{ 
	// TODO: Add your command handler code here 
	CUserChangePs dlg; 
	dlg.DoModal(); 
} 
 
void CUserFrameDlg::OnUserExit()  
{ 
	// TODO: Add your command handler code here 
	MessageBox("成功退出,感谢你的使用"); 
	exit(0); 
} 
 
void CUserFrameDlg::OnCancel()  
{ 
	// TODO: Add extra cleanup here 
	MessageBox("程序即将关闭,感谢你的使用"); 
	exit(1); 
	CDialog::OnCancel(); 
} 
 
void CUserFrameDlg::OnUserModifyinfo()  
{ 
	// TODO: Add your command handler code here 
	CUserEditDlg dlg; 
	dlg.DoModal(); 
}