www.pudn.com > 《MFC Windows程序设计(第二版)》.rar > MouseCap.h, change:1999-03-12,size:746b
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance ();
};
class CMainWindow : public CFrameWnd
{
protected:
BOOL m_bTracking; // TRUE if rubber banding
BOOL m_bCaptureEnabled; // TRUE if capture enabled
CPoint m_ptFrom; // "From" point for rubber banding
CPoint m_ptTo; // "To" point for rubber banding
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 ()
};