LAPTOP-SNT8I5JK\Boounion
2025-09-22 9e9e63ef44ff672989d7b78bf37afb2054267671
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#if !defined(AFX_STATICMAP_H__5A9433C1_E8A9_4393_9E0D_B7A996B9AF3F__INCLUDED_)
#define AFX_STATICMAP_H__5A9433C1_E8A9_4393_9E0D_B7A996B9AF3F__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// StaticMap.h : header file
//
 
#define ORIGIN_LEFTTOP        1
#define ORIGIN_LEFTBOTTOM    0
#define ORIGIN_RIGHTTOP        2
#define ORIGIN_RIGHTBOTTOM    3
 
#define UM_MAP_CHANGED            5573
#define _MENU_DEFECT_LIST_ID_    8000
/////////////////////////////////////////////////////////////////////////////
// CStaticMap window
enum OriginDirection        { OD_LeftTop = 0, OD_RightTop = 1, OD_LeftBottom = 10, OD_RightBottom = 11 };
 
class AFX_EXT_CLASS CStaticMap : public CStatic
{
    // Construction
public:
    CStaticMap();
 
    // Attributes
public:
 
    // Operations
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        MouseLBtnDwn(CPoint& point)                { }
    virtual void        MouseLBtnUp(CPoint& point)                { }
    virtual void        MouseLBtnMove(CPoint& point)            { }
    virtual void        MouseLBtnDblClk(CPoint& point)            { }
    virtual void        MouseRBtnDwn(CPoint& point)                { }
    virtual void        MouseRBtnUp(CPoint& point)                { }
    virtual void        MouseRBtnDblClk(CPoint& point)            { }
    virtual void        RegistNoDefect()                        { }
    virtual void        Timer(UINT 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                SaveMapToFile(CString strFileName);
    void                SetBGColor(COLORREF color) { m_clBGColor = color; }
 
    // Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CStaticMap)
    //}}AFX_VIRTUAL
 
    // Implementation
public:
    virtual ~CStaticMap();
 
    // Generated message map functions
protected:
    void                SetMappingMode(CDC *pDC);
    CPoint                SetWindowToGlass(CPoint pt);
    CPoint                SetGlassToWindow(CPoint pt);
    void                ControlZoom(BOOL bZoomIn, CPoint ptMouse);
 
    void                PopupMenu(int nBaseID, CPoint point);
 
    CWnd*                m_pParentWnd;
    int                    m_nMapTotalWidth;
    int                    m_nMapTotalHeight;
    int                    m_nMapWidth;
    int                    m_nMapHeight;
    int                    m_nMapMarginWidth;
    int                    m_nMapMarginHeight;
    CRect                m_RectWnd;
    CRect                m_RectMap;
    long                m_clBGColor;
    long                m_clPatColor;
    //////////////////////////////////////////////////////////////////////////
    // 弊府扁 沥焊
    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_dRatio;
    CPoint                m_PointWindowStart;
    BOOL                m_bDragMove;
    CPoint                m_PointDragStart;
    BOOL                m_bIsMiniMap;            // Minimap篮 犬措/绵家甫 救茄促.
    CPoint                m_PointGlassStart;        // Glass 吝 泅犁 焊咯瘤绰 康开.
    CPoint                m_PointGlassEnd;
 
    POINT                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 OnLButtonUp(UINT nFlags, CPoint point);
    afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
    afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
    afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
    afx_msg void OnMouseMove(UINT nFlags, CPoint point);
    afx_msg long OnUpdateMap(WPARAM wParam, LPARAM lParam);
    afx_msg void OnMenuChangeViewMode(UINT nID);
    afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
    //}}AFX_MSG
 
    DECLARE_MESSAGE_MAP()
};
 
/////////////////////////////////////////////////////////////////////////////
 
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
 
#endif // !defined(AFX_STATICMAP_H__5A9433C1_E8A9_4393_9E0D_B7A996B9AF3F__INCLUDED_)