// CLS_TDButton.cpp : implementation file
//

#include "stdafx.h"
#include "PlayDemo_VC.h"
#include "CLS_TDButton.h"
#include "PlayDemo_VCDlg.h"

// CLS_TDButton

IMPLEMENT_DYNAMIC(CLS_TDButton, CButton)

CLS_TDButton::CLS_TDButton()
{

}

CLS_TDButton::~CLS_TDButton()
{
}


BEGIN_MESSAGE_MAP(CLS_TDButton, CButton)
	ON_WM_RBUTTONDOWN()
END_MESSAGE_MAP()



// CLS_TDButton message handlers



void CLS_TDButton::OnRButtonDown(UINT nFlags, CPoint point)
{
	// TODO: Add your message handler code here and/or call default

	CPlayDemo_VCDlg* pDlg = (CPlayDemo_VCDlg*)AfxGetMainWnd();//获得主窗口的实例指针		
	ClientToScreen(&point);
	(pDlg->m_mnPopMenu).TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, point.y, pDlg);

	CButton::OnRButtonDown(nFlags, point);
}
