⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 richedit.cpp

📁 用CJ60Lib界面库制作的SQL数据库客户与服务器程序。
💻 CPP
字号:
// RichEdit.cpp : implementation file
//

#include "stdafx.h"
#include "Client.h"
#include "RichEdit.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRichEdit

CRichEdit::CRichEdit()
{
}

CRichEdit::~CRichEdit()
{
}


BEGIN_MESSAGE_MAP(CRichEdit, CRichEditCtrl)
	//{{AFX_MSG_MAP(CRichEdit)
	ON_WM_RBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRichEdit message handlers
void CRichEdit::SetMenuID( UINT nID )
{
	m_menuID = nID;
}

UINT CRichEdit::GetMenuID()
{
	return m_menuID;
}

void CRichEdit::OnRButtonDown(UINT nFlags, CPoint point) 
{
	CRichEditCtrl::OnRButtonDown(nFlags, point);
	
	CRect Rect;
	GetClientRect(Rect);
	ClientToScreen(Rect);
	point.Offset( Rect.TopLeft() );

	CMenu menu;
	VERIFY( menu.LoadMenu( m_menuID ) );
	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);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -