?? newedit.cpp
字號:
// NewEdit.cpp : implementation file
//
#include "stdafx.h"
#include "NewEdit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CNewEdit
CNewEdit::CNewEdit()
{
isReadOnly=FALSE;
}
CNewEdit::~CNewEdit()
{
}
BEGIN_MESSAGE_MAP(CNewEdit, CEdit)
//{{AFX_MSG_MAP(CNewEdit)
ON_WM_RBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNewEdit message handlers
BOOL CNewEdit::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(isReadOnly && (pMsg->message==WM_KEYDOWN))
{
if(!(pMsg->wParam==13||pMsg->wParam==9))
return TRUE;
}
if(pMsg->wParam==13) pMsg->wParam=9;
return CEdit::PreTranslateMessage(pMsg);
}
void CNewEdit::SetReadOnlyState(BOOL isro)
{
isReadOnly=isro;
}
void CNewEdit::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(!isReadOnly)
CEdit::OnRButtonDown(nFlags, point);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -