maindlg.cpp

来自「VC编写的简单发包程序和内存分配。内涵源码和测试。」· C++ 代码 · 共 104 行

CPP
104
字号
// MainDlg.cpp : implementation file
//

#include "stdafx.h"
#include "idstest.h"
#include "MainDlg.h"
#include "SndipDlg.h"
#include "SetMemDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMainDlg dialog


CMainDlg::CMainDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CMainDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CMainDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	m_icon=AfxGetApp()->LoadIcon(IDI_MAIN_ICON);
}


void CMainDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMainDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMainDlg, CDialog)
	//{{AFX_MSG_MAP(CMainDlg)
	ON_BN_CLICKED(IDC_BUTTON_IPDATA, OnButtonIpdata)
	ON_BN_CLICKED(IDC_BUTTON_SETMEM, OnButtonSetmem)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMainDlg message handlers

BOOL CMainDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	SetIcon(m_icon,TRUE);
	SetIcon(m_icon,FALSE);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CMainDlg::OnButtonIpdata() 
{
	// TODO: Add your control notification handler code here
	CSndipDlg TheDlg;
	int retn=TheDlg.DoModal();
	switch(retn)
	{
	case IDOK:
		{
			//
			break;
		}
	case IDCANCEL:
		{
			//
			break;
		}
	default:
		break;
	}
}

void CMainDlg::OnButtonSetmem() 
{
	// TODO: Add your control notification handler code here
	CSetmemDlg TheDlg;
	int retn=TheDlg.DoModal();
	switch(retn)
	{
	case IDOK:
		{
			//
			break;
		}
	case IDCANCEL:
		{
			//
			break;
		}
	default:
		break;
	}
	
}

⌨️ 快捷键说明

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