📄 backdropview.cpp
字号:
// BackDropView.cpp : implementation file
//
#include "stdafx.h"
#include "AliEditor.h"
#include "BackDropView.h"
#include "MainFrm.h"
#include "SwitchView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBackDropView
IMPLEMENT_DYNCREATE(CBackDropView, CView)
CBackDropView::CBackDropView()
{
m_ObjEditor = new CAliEditorView();
}
CBackDropView::~CBackDropView()
{
// delete m_ObjEditor;
}
BEGIN_MESSAGE_MAP(CBackDropView, CView)
//{{AFX_MSG_MAP(CBackDropView)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBackDropView drawing
void CBackDropView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CBackDropView diagnostics
#ifdef _DEBUG
void CBackDropView::AssertValid() const
{
CView::AssertValid();
}
void CBackDropView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CBackDropView message handlers
void CBackDropView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
}
int CBackDropView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
DWORD dwStyle = 0x50000000;
m_ObjEditor->Create(NULL,NULL,dwStyle,CRect(0,0,0,0),this,AFX_IDW_PANE_FIRST+50);
if( !m_dlgFavEdit.Create(IDD_FAVORITE_EDIT, this) )
return -1;
return 0;
}
void CBackDropView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
if( m_ObjEditor->GetSafeHwnd() )
{
m_ObjEditor->MoveWindow(0, 0, cx, cy);
}
if( m_dlgFavEdit.GetSafeHwnd() )
{
m_dlgFavEdit.MoveWindow(0,0,cx,cy);
}
}
CAliEditorView* CBackDropView::GetAliEditorView()
{
return m_ObjEditor;
}
CDlgFavoriteEdit* CBackDropView::GetFavoriteEditView()
{
return &m_dlgFavEdit;
}
void CBackDropView::SetCurrentView(int nType)
{
CMainFrame* pFrm = (CMainFrame*)AfxGetMainWnd();
if( nType == FAVORITE_TYPE )
{
m_dlgFavEdit.ShowWindow(SW_SHOW);
m_ObjEditor->ShowWindow(SW_HIDE);
pFrm->GetSwitchView()->EnableRadio(FALSE);
}
else
{
m_dlgFavEdit.ShowWindow(SW_HIDE);
m_ObjEditor->ShowWindow(SW_SHOW);
pFrm->GetSwitchView()->EnableRadio(TRUE);
}
}
bool CBackDropView::UpdateFavoriteGroup(chunk_item_list* pFavorGroup)
{
return m_dlgFavEdit.UpdateFavoriteGroup(pFavorGroup);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -