#include <afxwin.h>
class CMyApp:public CWinApp{
public:
virtual BOOL InitInstance();
};
class CMainWindow:public CFrameWnd{
protected:
BOOL m_bTracking;
BOOL m_bCaptureEnabled;
CPoint m_ptFrom;
CPoint m_ptTo;
void InvertLine(CDC* pDC,CPoint ptFrom,CPoint ptTo);
public:
CMainWindow();
protected:
afx_msg void OnLButtonDown(UINT nFlags,CPoint point);
afx_msg void OnLButtonUp(UINT nFlags,CPoint point);
afx_msg void OnMouseMove(UINT nFlags,CPoint point);
afx_msg void OnNcLButtonDown(UINT nHitTest,CPoint point);
DECLARE_MESSAGE_MAP()
};
#include"MouseCap.h"
CMyApp myApp;
BOOL CMyApp::InitInstance(){
m_pMainWnd = new CMainWindow;
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
BEGIN_MESSAGE_MAP(CMainWindow,CFrameWnd)
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
ON_WM_NCLBUTTONDOWN()
END_MESSAGE_MAP()
CMainWindow::CMainWindow(){