📄 readme.wzd
字号:
/////////////////////////////////////////////////////////////////////
// Example files.
/////////////////////////////////////////////////////////////////////
WzdSlct.cpp -- a select class which cuts, copies and pastes
WzdSlct.h
WzdInfo1.cpp -- some example data classes to cut and paste
WzdInfo1.h
WzdInfo2.cpp
WzdInfo2.h
/////////////////////////////////////////////////////////////////////
// Modify the View Class.
/////////////////////////////////////////////////////////////////////
// 1) embed the selection class in the view class
CWzdSelect m_select;
// 2) call the selection class to select a list of data class objects
m_select.Select(GetDocument()->GetInfo1List()->GetHead());
// 3) call the selection class to cut, copy or paste the selection
void CWzdView::OnEditCut()
{
m_select.CutSelections(GetDocument()->GetInfo1List());
}
void CWzdView::OnEditCopy()
{
m_select.CopySelections();
}
void CWzdView::OnEditPaste()
{
m_select.PasteClipboard(GetDocument()->GetInfo1List());
}
// 4) enable/disable the cut, copy, paste menu commands
void CWzdView::OnUpdateEditCut(CCmdUI* pCmdUI)
{
pCmdUI->Enable(m_select.SelectionCount());
}
void CWzdView::OnUpdateEditCopy(CCmdUI* pCmdUI)
{
pCmdUI->Enable(m_select.SelectionCount());
}
void CWzdView::OnUpdateEditPaste(CCmdUI* pCmdUI)
{
pCmdUI->Enable(m_select.CanPasteClipboard());
}
/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1998 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -