// DefectMap.h: interface for the CDefectMap class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_DEFECTMAP_H__CF34B34E_7A0E_4CBB_880F_4C41FF83A64B__INCLUDED_) #define AFX_DEFECTMAP_H__CF34B34E_7A0E_4CBB_880F_4C41FF83A64B__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define ORIGIN_LEFTTOP 1 #define ORIGIN_LEFTBOTTOM 0 #define ORIGIN_RIGHTTOP 2 #define ORIGIN_RIGHTBOTTOM 3 #define UM_MAP_CHANGED 5573 enum OriginDirection { OD_LeftTop = 0, OD_RightTop = 1, OD_LeftBottom = 10, OD_RightBottom = 11 }; class AFX_EXT_CLASS CDefectMap : public CStatic { public: CDefectMap(); virtual ~CDefectMap(); public: void InitGlass(CWnd* pParent, int nMapWidth, int nMapHeight, int nMapMargin); // Pixel ´ÜÀ§ ¸¶Áø. void DeinitGlass(); int GetMapTotalWidth() { return m_nMapTotalWidth; } int GetMapTotalHeight() { return m_nMapTotalHeight; } int GetMapWidth() { return m_nMapWidth; } int GetMapHeight() { return m_nMapHeight; } void SetMiniMap(BOOL bIsMiniMap, int nUnitSize) { m_bIsMiniMap = bIsMiniMap; m_nUnitSize = nUnitSize; } int GetUnitSize() { return m_nUnitSize; } virtual void DrawGlass(CDC* pDC) { } virtual void MouseRBtnDwn(CPoint& point) { } virtual void MouseLBtnDwn(CPoint& point) { } virtual void MouseLBtnUp(CPoint& point) { } virtual void MouseLBtnMove(CPoint& point) { } virtual void MouseLBtnDblClk(CPoint& point) { } virtual void Timer(UINT_PTR nIDEvent) { } // È®´ë/Ãà¼Ò void IncreaseRatio(); void DecreaseRatio(); void ResetRatio(); CPoint& GetDisplayStart() { return m_PointGlassStart; } CPoint& GetDisplayEnd() { return m_PointGlassEnd; } void SetDisplayRect(CPoint& PointStart, CPoint& PointEnd); void SetShowShot(BOOL bShow) { m_bShowShot = bShow; } void ConvertGlassToView(CRect &rect); void ConvertGlassToView(CPoint &pt); CRect ConvertViewToGlass(CRect &rect); CPoint ConvertViewToGlass(CPoint &pt); // ÀúÀå void SaveMapToFile(CString strFileName); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CStaticMap) //}}AFX_VIRTUAL protected: CWnd* m_pParentWnd; int m_nMapTotalWidth; int m_nMapTotalHeight; int m_nMapWidth; int m_nMapHeight; CRect m_RectWnd; CRect m_RectMap; ////////////////////////////////////////////////////////////////////////// // ±×¸®±â Á¤º¸ HBITMAP m_hDrawingSurface; BITMAPINFOHEADER m_BMIH; CRect m_RectDrawingSurface; BYTE* m_pDrawingSurfaceBits; OriginDirection m_OriginDir; int m_nUnitSize; // Cell ±×¸®±â BOOL m_bShowShot; // È®´ë/Ãà¼Ò CRect m_RectShowWnd; double m_dWidthRatio; double m_dHeightRatio; double m_dRatio; CPoint m_PointWindowStart; BOOL m_bDragMove; CPoint m_PointDragStart; BOOL m_bIsMiniMap; // MinimapÀº È®´ë/Ãà¼Ò¸¦ ¾ÈÇÑ´Ù. CPoint m_PointGlassStart; // Glass Áß ÇöÀç º¸¿©Áö´Â ¿µ¿ª. CPoint m_PointGlassEnd; CPoint m_PointCCut[3]; //ÄÚ³ÊÄÆ ±×¸®±â ÁÂÇ¥ int m_nCCutSize; int m_nCoordGabX; // ÁÂÇ¥¸¦ »Ñ¸± °Å¸®. int m_nCoordGabY; // ÁÂÇ¥¸¦ »Ñ¸± °Å¸®. //{{AFX_MSG(CStaticGlass) afx_msg void OnPaint(); afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg long OnUpdateMap(WPARAM wParam, LPARAM lParam); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #endif // !defined(AFX_DEFECTMAP_H__CF34B34E_7A0E_4CBB_880F_4C41FF83A64B__INCLUDED_)