📄 treemsg.cpp
字号:
// TreeMsg.cpp : implementation file
//
#include "stdafx.h"
#include "SnmpManager.h"
#include "TreeMsg.h"
#include "ChildFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTreeMsg
CTreeMsg::CTreeMsg()
{
}
CTreeMsg::~CTreeMsg()
{
}
BEGIN_MESSAGE_MAP(CTreeMsg, CTreeCtrl)
//{{AFX_MSG_MAP(CTreeMsg)
ON_WM_LBUTTONDBLCLK()
ON_WM_RBUTTONDOWN()
ON_COMMAND(ID_FUNCTION, OnFunction)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTreeMsg message handlers
void CTreeMsg::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CChildFrame* pFrame = new CChildFrame();
CTreeCtrl::OnLButtonDblClk(nFlags, point);
}
void CTreeMsg::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CRect rc;
GetWindowRect(&rc);
point.x = rc.left + point.x ;
point.y = rc.top + point.y ;
CMenu* pPopMenu = new CMenu;
pPopMenu->LoadMenu (IDR_MENU1);
CMenu* pFileMenu = pPopMenu->GetSubMenu (0);
pFileMenu->TrackPopupMenu (TPM_LEFTALIGN | TPM_RIGHTBUTTON,
point.x ,point.y ,this);
delete pPopMenu;
CTreeCtrl::OnRButtonDown(nFlags, point);
}
void CTreeMsg::OnFunction()
{
// TODO: Add your command handler code here
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -