15,979
社区成员
发帖
与我相关
我的任务
分享
// MyTree.cpp : implementation file
//
#include "stdafx.h"
#include "Test.h"
#include "MyTree.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyTree
CMyTree::CMyTree()
{
}
CMyTree::~CMyTree()
{
}
BEGIN_MESSAGE_MAP(CMyTree, CTreeCtrl)
//{{AFX_MSG_MAP(CMyTree)
ON_COMMAND(ID_MENUITEM32771, OnMenuitem32771) // 改成ON_CONTROL_REFLECT也没用
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyTree message handlers
void CMyTree::OnMenuitem32771()
{
AfxMessageBox("hi"); // 点击菜单项后此处没有执行
}
BOOL TrackPopupMenu(
UINT nFlags,
int x,
int y,
CWnd* pWnd,
LPCRECT lpRect = 0
);
pWnd
Identifies the window that owns the pop-up menu. This window receives all WM_COMMAND messages from the menu. In Windows versions 3.1 and later, the window does not receive WM_COMMAND messages until TrackPopupMenu returns. In Windows 3.0, the window receives WM_COMMAND messages before TrackPopupMenu returns.