📄 switchview.cpp
字号:
// SwitchView.cpp : implementation file
//
#include "stdafx.h"
#include "AliEditor.h"
#include "SwitchView.h"
#include "MainFrm.h"
#include "AliEditorView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSwitchView
IMPLEMENT_DYNCREATE(CSwitchView, CFormView)
CSwitchView::CSwitchView()
: CFormView(CSwitchView::IDD)
{
//{{AFX_DATA_INIT(CSwitchView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CSwitchView::~CSwitchView()
{
}
void CSwitchView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSwitchView)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSwitchView, CFormView)
//{{AFX_MSG_MAP(CSwitchView)
ON_BN_CLICKED(IDC_TV_RADIO, OnTvRadio)
ON_BN_CLICKED(IDC_RADIO_RADIO, OnRadioRadio)
ON_BN_CLICKED(IDC_ALL_RADIO, OnAllRadio)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSwitchView diagnostics
#ifdef _DEBUG
void CSwitchView::AssertValid() const
{
CFormView::AssertValid();
}
void CSwitchView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSwitchView message handlers
BOOL CSwitchView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
BOOL bRet = CFormView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
CButton *pButton = (CButton *)GetDlgItem(IDC_ALL_RADIO);
pButton->SetCheck(1);
return bRet;
}
void CSwitchView::OnTvRadio()
{
// TODO: Add your control notification handler code here
((CMainFrame*)AfxGetMainWnd())->GetEditorView()->UpdateListViewByType(1);
}
void CSwitchView::OnRadioRadio()
{
// TODO: Add your control notification handler code here
((CMainFrame*)AfxGetMainWnd())->GetEditorView()->UpdateListViewByType(0);
}
void CSwitchView::OnAllRadio()
{
// TODO: Add your control notification handler code here
((CMainFrame*)AfxGetMainWnd())->GetEditorView()->UpdateListViewByType(2);
}
void CSwitchView::EnableRadio(BOOL bEnable)
{
GetDlgItem(IDC_TV_RADIO)->EnableWindow(bEnable);
GetDlgItem(IDC_RADIO_RADIO)->EnableWindow(bEnable);
GetDlgItem(IDC_ALL_RADIO)->EnableWindow(bEnable);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -