#include "stdafx.h" #include "Global.h" #include "CMDBtn.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif CCMDBtn::CCMDBtn(void) { Cmd = 0x00; } BEGIN_MESSAGE_MAP(CCMDBtn, CButton) //{{AFX_MSG_MAP(CMCBtn) ON_WM_LBUTTONUP() ON_WM_LBUTTONDOWN() //}}AFX_MSG_MAP END_MESSAGE_MAP() CCMDBtn::~CCMDBtn(void) { } void CCMDBtn::OnLButtonUp( UINT nFlags, CPoint point ) { g_FrameCamera.ckCmd = 0x00; g_FrameCamera.SendPrepare(); if(g_IsSending) g_MUDPCamera.SendToY(g_FrameCamera.Addr(),8); CButton::OnLButtonUp( nFlags, point ); } void CCMDBtn::OnLButtonDown( UINT nFlags, CPoint point ) { g_FrameCamera.ckCmd = Cmd; g_FrameCamera.SendPrepare(); if(g_IsSending) g_MUDPCamera.SendToY(g_FrameCamera.Addr(),8); CButton::OnLButtonDown( nFlags, point ); }