manage.cpp

来自「基于MFC实现的图书管管理系统」· C++ 代码 · 共 72 行

CPP
72
字号
// manage.cpp : implementation file
//

#include "stdafx.h"
#include "图书馆管理系统.h"
#include "manage.h"
#include "reinforce.h"
#include "decrease.h"

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

/////////////////////////////////////////////////////////////////////////////
// manage dialog


manage::manage(CWnd* pParent /*=NULL*/)
	: CDialog(manage::IDD, pParent)
{
	//{{AFX_DATA_INIT(manage)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


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

BEGIN_MESSAGE_MAP(manage, CDialog)
	//{{AFX_MSG_MAP(manage)
	ON_BN_CLICKED(IDC_REINFORCE, OnReinforce)
	ON_BN_CLICKED(IDC_DECREASE, OnDecrease)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// manage message handlers

void manage::OnReinforce() 
{
	// TODO: Add your control notification handler code here
	type=0;
}

void manage::OnDecrease() 
{
	// TODO: Add your control notification handler code here
	type=1;
}

void manage::OnOK() 
{
	// TODO: Add extra validation here
	if (type)
	{decrease a;
	 a.DoModal();
	}
	else
	{ reinforce a;
	  a.DoModal();
	}
}

⌨️ 快捷键说明

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