Mouse Click Example Program in VC++
#include<afxwin.h>
#include<afxext.h>
class Frame : public CFrameWnd {
public:
Frame() {
Create(0, "Mouse Click");
}
void OnLButtonDown(UINT i, CPoint Point) {
MessageBox("Performance : Left Click Once");
}
void OnRButtonDown(UINT i, CPoint Point) {
MessageBox("Performance : Right Click Once");
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(Frame, CFrameWnd)
ON_WM_LBUTTONDOWN()
ON_WM_RBUTTONDOWN()
ON_WM_CREATE()
END_MESSAGE_MAP()
class Applet : public CWinApp {
public:
int InitInstance() {
Frame *Pointer = new Frame();
Pointer->ShowWindow(3);
m_pMainWnd = Pointer;
return true;
}
};
Applet Instance;