Program // Mouseeventsview - CPP: Implementation of The Cmouseeventsview Class
Program // Mouseeventsview - CPP: Implementation of The Cmouseeventsview Class
#include "stdafx.h"
#include "MouseEvents.h"
#include "MouseEventsDoc.h"
#include "MouseEventsView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// CMouseEventsView
IMPLEMENT_DYNCREATE(CMouseEventsView, CView)
BEGIN_MESSAGE_MAP(CMouseEventsView, CView)
//{{AFX_MSG_MAP(CMouseEventsView)
ON_WM_LBUTTONDBLCLK()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_RBUTTONDBLCLK()
ON_WM_RBUTTONDOWN()
ON_WM_RBUTTONUP()
//}}AFX_MSG_MAP
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW,
CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMouseEventsView construction/destruction
CMouseEventsView::CMouseEventsView()
{
// TODO: add construction code here
}
CMouseEventsView::~CMouseEventsView()
{
}
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CMouseEventsView drawing
/////////////////////////////////////////////////////////////////////////////
// CMouseEventsView diagnostics
#ifdef _DEBUG
void CMouseEventsView::AssertValid() const
{
CView::AssertValid();
}
/////////////////////////////////////////////////////////////////////////////
// CMouseEventsView message handlers
void CMouseEventsView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CDC* pDC=GetDC();
pDC->TextOut(100,100,"Left Mouse Double click !!");
ReleaseDC(pDC);
CView::OnLButtonDblClk(nFlags, point);
}
OUTPUT