/*[]=====================================================================[]*/ /*[] LeadTools Run Time Library - Version 14 []*/ /*[] []*/ /*[] []*/ /*[] Copyright (c)1991-2004 LEAD Technologies, Inc. []*/ /*[] All Rights Reserved. []*/ /*[]=====================================================================[]*/ #if !defined(AFX_ABCVIEW_H__7B7648EB_D1AE_4F4B_B7ED_278E4C89AA0F__INCLUDED_) #define AFX_ABCVIEW_H__7B7648EB_D1AE_4F4B_B7ED_278E4C89AA0F__INCLUDED_ #include "ABCDoc.h" #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 //DEFINES for m_nViewMode #define VIEW_NORMAL 0x0 #define VIEW_ZOOM 0x1 #define VIEW_FIT 0x2 #define VIEW_SNAP 0x3 #define ID_REGIONEVENT 1 //region outline timer id #define REGIONEVENTDELAY 100 //region outine animation delay #define IDM_TOOLNONE 0 #define IDM_TOOLRECT 1 #define IDM_TOOLFREEHAND 2 /***************************************************************** Types ****************************************************************/ //structure for storing Region data typedef struct tagIMAGEDATA { L_BOOL bFitImage; //if TRUE then fit image to window L_INT cxClient; //width of client area L_INT cyClient; //height of client area RECT rcView; BITMAPHANDLE *pBitmap; L_UINT uFrameType; //set to FRAME_TYPE_COLOR (10)// For anmation HRGN hRgnWindows; POINT pointStart; } IMAGEDATA; typedef IMAGEDATA L_FAR *LPIMAGEDATA; class CABCView : public CScrollView { protected: CABCView(); DECLARE_DYNCREATE(CABCView) public: CABCDoc* GetDocument(); void OnSizeChange(); void SetZoom(int nZoom); RECT m_rcDst; L_INT m_nZoom; L_INT m_nViewMode; IMAGEDATA m_Data; BOOL m_bResizePlz; public: L_VOID UpdateDisplayPalette( CDC* pDC, pBITMAPHANDLE pBitmap ); // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CABCView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual void OnInitialUpdate(); protected: virtual void OnUpdate(CScrollView* pSender, LPARAM lHint, CObject* pHint); //}}AFX_VIRTUAL public: virtual ~CABCView(); void Fitimagetowindow(); protected: // Generated message map functions protected: //{{AFX_MSG(CABCView) afx_msg LRESULT OnDoRealize(WPARAM wParam, LPARAM lParam); // user message afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnViewNormal(); afx_msg void OnUpdateViewNormal(CCmdUI* pCmdUI); afx_msg void OnViewFitimagetowindow(); afx_msg void OnViewSnapwindowtoimage(); afx_msg void OnUpdateViewFitimagetowindow(CCmdUI* pCmdUI); afx_msg void OnUpdateViewSnapwindowtoimage(CCmdUI* pCmdUI); afx_msg void OnViewZoomin2x(); afx_msg void OnViewZoomout2x(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnSetFocus(CWnd* pOldWnd); afx_msg void OnKillFocus(CWnd* pNewWnd); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_ABCVIEW_H__7B7648EB_D1AE_4F4B_B7ED_278E4C89AA0F__INCLUDED_)