📄 pbdefenseview.cpp
字号:
// pbDefenseView.cpp : implementation of the CPbDefenseView class
//
#include "stdafx.h"
#include "pbDefense.h"
#include "pbDefenseDoc.h"
#include "pbDefenseView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "VariableManagementD.h"
#include "PolicyManagementD.h"
#include "ObjectDlg.h"
#include "AttribDlg.h"
#include "PolicyManagementD.h"
/////////////////////////////////////////////////////////////////////////////
// CPbDefenseView
IMPLEMENT_DYNCREATE(CPbDefenseView, CFormView)
BEGIN_MESSAGE_MAP(CPbDefenseView, CFormView)
//{{AFX_MSG_MAP(CPbDefenseView)
ON_COMMAND(ID_MANAGEMENT_VARIABLE, OnManagementVariable)
ON_COMMAND(ID_MANAGEMENT_ATTRIBUTE, OnManagementAttribute)
ON_COMMAND(ID_MANAGEMENT_OBJECT, OnManagementObject)
ON_COMMAND(ID_POLICY_BASE, OnPolicyBase)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPbDefenseView construction/destruction
CPbDefenseView::CPbDefenseView()
: CFormView(CPbDefenseView::IDD)
{
//{{AFX_DATA_INIT(CPbDefenseView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CPbDefenseView::~CPbDefenseView()
{
}
void CPbDefenseView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPbDefenseView)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CPbDefenseView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
void CPbDefenseView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CPbDefenseView printing
BOOL CPbDefenseView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CPbDefenseView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CPbDefenseView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
void CPbDefenseView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}
/////////////////////////////////////////////////////////////////////////////
// CPbDefenseView diagnostics
#ifdef _DEBUG
void CPbDefenseView::AssertValid() const
{
CFormView::AssertValid();
}
void CPbDefenseView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CPbDefenseDoc* CPbDefenseView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPbDefenseDoc)));
return (CPbDefenseDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CPbDefenseView message handlers
void CPbDefenseView::OnManagementVariable()
{
// TODO: Add your command handler code here
CVariableManagementD manageDlg;
manageDlg.DoModal();
}
void CPbDefenseView::OnManagementAttribute()
{
// TODO: Add your command handler code here
CAttribDlg manageAttDlg;
manageAttDlg.DoModal();
}
void CPbDefenseView::OnManagementObject()
{
// TODO: Add your command handler code here
CObjectDlg manageObjDlg;
manageObjDlg.DoModal();
}
void CPbDefenseView::OnPolicyBase()
{
// TODO: Add your command handler code here
CPolicyManagementD dlg;
dlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -