treemsg.cpp

来自「路由信息查看程序」· C++ 代码 · 共 66 行

CPP
66
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?