GME
13
|
00001 #if !defined(AFX_PANNINGBUTTON_H__B7B65E67_B459_4C91_A578_16AF27271A47__INCLUDED_) 00002 #define AFX_PANNINGBUTTON_H__B7B65E67_B459_4C91_A578_16AF27271A47__INCLUDED_ 00003 00004 #if _MSC_VER > 1000 00005 #pragma once 00006 #endif // _MSC_VER > 1000 00007 // PanningButton.h : header file 00008 // 00009 00011 // CPanningButton window 00012 00013 class CPanningButton : public CWnd 00014 { 00015 // Construction 00016 public: 00017 CPanningButton(); 00018 bool Create(); 00019 void SetBitmapDC(HWND owner, HDC bdc, HBITMAP oldBmp, CRect& ori, CRect& rect, COLORREF& bkgrnd); 00020 void SetViewRect(CRect vrect); 00021 00022 private: 00023 HCURSOR m_arrowh; 00024 HCURSOR m_sizeallh; 00025 COLORREF m_backgorund; 00026 00027 bool m_inMove; 00028 CPoint m_moveStartPoint; 00029 CRect m_moveStartRect; 00030 00031 HWND m_owner; 00032 HDC m_bitmapDC; 00033 HBITMAP m_oldBmp; 00034 CRect m_bitmapSizeOri; 00035 CRect m_bitmapSizeStored; 00036 CRect m_bitmapOnScreen; 00037 00038 CRect m_viewRectOnStored; 00039 00040 CRect m_viewRectOnScreen; 00041 CRect m_viewRectInMove; 00042 00043 double m_storedToScreenRx; 00044 double m_storedToScreenRy; 00045 double m_oriToStoredRx; 00046 double m_oriToStoredRy; 00047 00048 void BmpToScreen(CRect clientr); 00049 void ViewRectToScreen(CRect& vRect); 00050 void DeleteDeviceContext(HDC bDC, HBITMAP oldBmp); 00051 00052 // Operations 00053 public: 00054 00055 // Overrides 00056 // ClassWizard generated virtual function overrides 00057 //{{AFX_VIRTUAL(CPanningButton) 00058 //}}AFX_VIRTUAL 00059 00060 // Implementation 00061 public: 00062 virtual ~CPanningButton(); 00063 00064 // Generated message map functions 00065 protected: 00066 //{{AFX_MSG(CPanningButton) 00067 afx_msg void OnPaint(); 00068 afx_msg BOOL OnEraseBkgnd(CDC* pDC); 00069 afx_msg void OnMouseMove(UINT nFlags, CPoint point); 00070 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 00071 afx_msg void OnLButtonUp(UINT nFlags, CPoint point); 00072 //}}AFX_MSG 00073 00074 DECLARE_MESSAGE_MAP() 00075 }; 00076 00078 00079 //{{AFX_INSERT_LOCATION}} 00080 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 00081 00082 #endif // !defined(AFX_PANNINGBUTTON_H__B7B65E67_B459_4C91_A578_16AF27271A47__INCLUDED_)