📄 maindlg.cpp
字号:
// MainDlg.cpp : implementation file
//
#include "stdafx.h"
#include "仓库管理系统.h"
#include "MainDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CShow* showdlg;
extern CDataRestore* datadlg;
/////////////////////////////////////////////////////////////////////////////
// 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
}
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_WM_CLOSE()
ON_BN_CLICKED(IDC_BUTTON1, OnMaterialManage)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
ON_BN_CLICKED(IDC_BUTTON6, OnButton6)
ON_BN_CLICKED(IDC_BUTTON7, OnButton7)
ON_BN_CLICKED(IDC_BUTTON8, OnButton8)
ON_BN_CLICKED(IDC_BUTTON9, OnButton9)
ON_BN_CLICKED(IDC_BUTTON10, OnButton10)
ON_BN_CLICKED(IDC_BUTTON11, OnButton11)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMainDlg message handlers
void CMainDlg::OnClose()
{
if(MessageBox("确定退出系统1?","提醒",MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION)!=IDNO){
exit(0);
}
}
void CMainDlg::OnMaterialManage()
{
showdlg->ShowWindow(SW_SHOW);
CString sql="select * from 物资表 order by 物资号";
showdlg->OnRefreshData(sql);
ShowWindow(SW_HIDE);
}
void CMainDlg::OnButton2()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton3()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton4()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton5()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton6()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton7()
{
datadlg->ShowWindow(SW_SHOW);
}
void CMainDlg::OnButton8()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton9()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton10()
{
MessageBox("尚未实现");
}
void CMainDlg::OnButton11()
{
if(MessageBox("确定退出系统1?","提醒",MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION)!=IDNO){
exit(0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -