⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 receivedialog.cpp

📁 《VC++ 编程技巧与示例 .rar》各个示例代码绝对可用
💻 CPP
字号:
// ReceiveDialog.cpp : implementation file
//

#include "stdafx.h"
#include "SDMSG.h"
#include "ReceiveDialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CReceiveDialog dialog
extern NEAR CSDMSGApp theApp;

CReceiveDialog::CReceiveDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CReceiveDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CReceiveDialog)
	//}}AFX_DATA_INIT
}


void CReceiveDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CReceiveDialog)
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CReceiveDialog, CDialog)
	//{{AFX_MSG_MAP(CReceiveDialog)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
	ON_MESSAGE(WM_SEND,OnSend)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CReceiveDialog message handlers

LRESULT CReceiveDialog::OnSend(WPARAM wParam, LPARAM lParam)
{
	BOOL Ok;
	CString msg;
	m_Vita=(Vita *)	wParam;

	ASSERT(m_Vita);

	//填充履历表:
	SetDlgItemText(IDC_STATIC_NAME,m_Vita->Name);

	msg.Format("%d",m_Vita->Age);
	SetDlgItemText(IDC_STATIC_AGE,msg);

	msg.Format("%d",m_Vita->Capable);
	SetDlgItemText(IDC_STATIC_CAP,msg);

	if(m_Vita->Age<22)//大学没毕业;
	{
		AfxMessageBox("还是先去念书吧!");
		Ok=FALSE;
		::PostMessage(theApp.m_pMainWnd->GetSafeHwnd(),//应用程序主窗口句柄;
					  WM_REPLY,
					  Ok,
					  0
					  );
		return TRUE;
	}

	if(m_Vita->Age>=40)//年龄有些大了;
	{
		AfxMessageBox("你去公司可能不适合。");
		Ok=FALSE;
		::PostMessage(theApp.m_pMainWnd->GetSafeHwnd(),//应用程序主窗口句柄;
					  WM_REPLY,
					  Ok,
					  0
					  );
		return TRUE;
	}
	if(m_Vita->Capable==TRUE)
	{
		if(m_Vita->Age>=22&&m_Vita->Age<25)//本科毕业;
		{
			AfxMessageBox("可以,月薪2000!");
			Ok=TRUE;
			::PostMessage(theApp.m_pMainWnd->GetSafeHwnd(),//应用程序主窗口句柄;
						  WM_REPLY,
						  Ok,
						  0
						  );
			return TRUE;
		}
		if(m_Vita->Age>=25&&m_Vita->Age<28)//研究生毕业;
		{
			AfxMessageBox("可以,月薪5000!");
			Ok=TRUE;
			::PostMessage(theApp.m_pMainWnd->GetSafeHwnd(),//应用程序主窗口句柄;
						  WM_REPLY,
						  Ok,
						  0
						  );
			return TRUE;
		}
		if(m_Vita->Age>=28&&m_Vita->Age<40)//博士毕业;
		{
			AfxMessageBox("可以,月薪5500!");
			Ok=TRUE;
			::PostMessage(theApp.m_pMainWnd->GetSafeHwnd(),//应用程序主窗口句柄;
						  WM_REPLY,
						  Ok,
						  0
						  );
			return TRUE;
		}
	}
	else
	{
		AfxMessageBox("有消息我们会打电话通知你!");
		Ok=FALSE;
		::PostMessage(theApp.m_pMainWnd->GetSafeHwnd(),//应用程序主窗口句柄;
					  WM_REPLY,
					  Ok,
					  0
					  );
		return TRUE;
	}
	return TRUE;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -