📄 clientview.cpp
字号:
// clientView.cpp : implementation of the CClientView class
//
#include "stdafx.h"
#include "client.h"
#include "clientDoc.h"
#include "clientView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClientView
IMPLEMENT_DYNCREATE(CClientView, CCrystalEditView)
BEGIN_MESSAGE_MAP(CClientView, CCrystalEditView)
//{{AFX_MSG_MAP(CClientView)
ON_WM_RBUTTONUP()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CCrystalEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CCrystalEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CCrystalEditView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CClientView construction/destruction
CClientView::CClientView()
{
}
CClientView::~CClientView()
{
}
/////////////////////////////////////////////////////////////////////////////
// CClientView message handlers
CCrystalTextBuffer* CClientView::LocateTextBuffer()
{
return &((CClientDoc* )GetDocument())->m_TextBuffer;
}
void CClientView::OnInitialUpdate()
{
CCrystalEditView::OnInitialUpdate();
SetFont(((CClientDoc *)GetDocument())->m_lf);
}
void CClientView::OnRButtonUp(UINT nFlags, CPoint point)
{
ClientToScreen( &point );
CMenu menu;
VERIFY( menu.LoadMenu( IDR_CRYSTAL ) );
CMenu* pPop = menu.GetSubMenu( 0 );
ASSERT( pPop );
CWnd* pWndPopupOwner = this;
while (pWndPopupOwner->GetStyle() & WS_CHILD)
pWndPopupOwner = pWndPopupOwner->GetParent();
pPop->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
pWndPopupOwner);
CCrystalEditView::OnRButtonUp(nFlags, point);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -