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

📄 foodmenudlg.cpp

📁 开发的,食物管理软件,可以在智能家电的终端上直接应用
💻 CPP
字号:
// FoodMenuDlg.cpp : implementation file
//

#include "stdafx.h"
#include "FoodMenu.h"
#include "FoodMenuDlg.h"
#include "NurritionAndNeedDlg.h"//add
#include "ChinaAndWestFood.h"//add
#include "ManageDlg.h"//add

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

/////////////////////////////////////////////////////////////////////////////
// CFoodMenuDlg dialog

CFoodMenuDlg::CFoodMenuDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CFoodMenuDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFoodMenuDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

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

BEGIN_MESSAGE_MAP(CFoodMenuDlg, CDialog)
	//{{AFX_MSG_MAP(CFoodMenuDlg)
	ON_BN_CLICKED(IDC_FOOD_NURRITION_BUTTON1, OnFoodNurritionButton1)
	ON_BN_CLICKED(IDC_CHINA_AND_WEST_BUTTON2, OnChinaAndWestButton2)
	ON_BN_CLICKED(IDC_MANAGE_BUTTON3, OnManageButton3)
	ON_BN_CLICKED(IDC_HOME, OnHome)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFoodMenuDlg message handlers

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

	// 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
	
	CenterWindow(GetDesktopWindow());	// center to the hpc screen

	// TODO: Add extra initialization here
	home.LoadBitmaps(IDB_home,IDB_home);
	back.LoadBitmaps(IDB_return,IDB_return);
     yin_yan_fen_xi.LoadBitmaps(IDB_si_wu_yinyan,IDB_si_wu_yinyan);
zong_xi_cai_pu.LoadBitmaps(IDB_zongxi_caipu,IDB_zongxi_caipu);
food_manage.LoadBitmaps(IDB_food_manage,IDB_food_manage);

	VERIFY(home.SubclassDlgItem(IDC_HOME, this));
    VERIFY(back.SubclassDlgItem(IDC_BACK, this));
	VERIFY(yin_yan_fen_xi.SubclassDlgItem(IDC_FOOD_NURRITION_BUTTON1, this));
	VERIFY(zong_xi_cai_pu.SubclassDlgItem(IDC_CHINA_AND_WEST_BUTTON2, this));
	VERIFY(food_manage.SubclassDlgItem(IDC_MANAGE_BUTTON3, this));

	home.SizeToContent();
	back.SizeToContent();
	yin_yan_fen_xi.SizeToContent();
	zong_xi_cai_pu.SizeToContent();
	food_manage.SizeToContent();
	return TRUE;  // return TRUE  unless you set the focus to a control
}



void CFoodMenuDlg::OnFoodNurritionButton1() 
{
	// TODO: Add your control notification handler code here
	CNurritionAndNeedDlg  NurritionAndNeedDlg;
	NurritionAndNeedDlg.DoModal();
}

void CFoodMenuDlg::OnChinaAndWestButton2() 
{
	// TODO: Add your control notification handler code here
    CChinaAndWestFood  ChinaAndWestFood;
     ChinaAndWestFood.DoModal();
}

void CFoodMenuDlg::OnManageButton3() 
{
	// TODO: Add your control notification handler code here
	CManageDlg ManageDlg;
	ManageDlg.DoModal();
}

void CFoodMenuDlg::OnHome() 
{
	CDialog::OnOK();	
}

⌨️ 快捷键说明

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