?? mainframe.cpp
字號(hào):
// MainFrame.cpp : implementation file
//
#include "stdafx.h"
#include "medicine.h"
#include "MainFrame.h"
#include "UserCode.h"
//UserMag.h"
#include "MediStore.h"
#include "MediEdit.h"
#include "MediFind.h"
#include "MediSale.h"
#include "SaleInfo.h"
#include "UserMag.h"
#include "Lose.h"
#include "OutDate.h"
#include "MediEdit.h"
#include "Profit.h"
#include "User.h"
extern CUser glUser;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMainFrame dialog
CMainFrame::CMainFrame(CWnd* pParent /*=NULL*/)
: CDialog(CMainFrame::IDD, pParent)
{
//{{AFX_DATA_INIT(CMainFrame)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CMainFrame::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMainFrame)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMainFrame, CDialog)
//{{AFX_MSG_MAP(CMainFrame)
ON_COMMAND(ID_USERCODE, OnUsercode)
ON_COMMAND(ID_MEDISTORE, OnMediStore)
ON_COMMAND(ID_MEDIFIND, OnMediFind)
ON_COMMAND(ID_MEDISELL, OnMediSell)
ON_COMMAND(ID_SALEINFO, OnSaleInfo)
ON_COMMAND(ID_USERMAG, OnUserMag)
ON_COMMAND(ID_LOSE, OnLose)
ON_COMMAND(ID_LASTDATEFIND, OnLastDateFind)
ON_COMMAND(ID_MEDIEDIT, OnMediEdit)
ON_COMMAND(ID_PROFIT, OnProfit)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
int CMainFrame::DoModal()
{
// TODO: Add your specialized code here and/or call the base class
return CDialog::DoModal();
}
/*void CMainFrame::OnChangePwd()
{
CUserCode dlg;
dlg.m_LoginName = user.LoginName;
dlg.DoModal();
}*/
void CMainFrame::OnUsercode()
{
// TODO: Add your command handler code here
CUserCode dlg;
//glUser要在前面用extern CUser curUser;來(lái)定義外圍變量并給其賦值
dlg.m_LoginId=glUser.UserId;
dlg.DoModal();
}
void CMainFrame::OnMediStore()
{
// TODO: Add your command handler code here
CMediStore dlg;
//glUser要在前面用extern CUser curUser;來(lái)定義外圍變量并給其賦值
dlg.glUser=glUser;
dlg.DoModal();
}
void CMainFrame::OnMediFind()
{
// TODO: Add your command handler code here
CMediFind dlg;
dlg.DoModal();
}
void CMainFrame::OnMediSell()
{
// TODO: Add your command handler code here
CMediSale dlg;
dlg.glUser=glUser;
dlg.DoModal();
}
void CMainFrame::OnSaleInfo()
{
// TODO: Add your command handler code here
CSaleInfo dlg;
dlg.DoModal();
}
void CMainFrame::OnUserMag()
{
// TODO: Add your command handler code here
CUserMag dlg;
dlg.DoModal();
}
void CMainFrame::OnLose()
{
// TODO: Add your command handler code here
CLose dlg;
dlg.DoModal();
}
void CMainFrame::OnLastDateFind()
{
// TODO: Add your command handler code here
COutDate dlg;
dlg.DoModal();
}
void CMainFrame::OnMediEdit()
{
// TODO: Add your command handler code here
CMediEdit dlg;
dlg.DoModal();
}
void CMainFrame::OnProfit()
{
// TODO: Add your command handler code here
CProfit dlg;
dlg.DoModal();
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -