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
#pragma once
 
 
// CCornerDistSetDlg ¶Ô»°¿ò
#include "VisionRecipe.h"
#include "afxwin.h"
 
enum CORNER_IMAGE_TYPE { 
    CORNER_IMAGE = 0, 
    CORNER_MEASURE_REGION, 
    CORNER_TOP_POINT,
    CORNER_BOT_POINT
};
 
class CCornerDistSetDlg : public CDialogEx
{
    DECLARE_DYNAMIC(CCornerDistSetDlg)
 
public:
    CCornerDistSetDlg(CWnd* pParent = NULL);   // ±ê×¼¹¹Ô캯Êý
    virtual ~CCornerDistSetDlg();
 
    // ¶Ô»°¿òÊý¾Ý
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_DLG_DIST_CORNER };
#endif
 
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV Ö§³Ö
 
    DECLARE_MESSAGE_MAP()
 
private:
    CListCtrl m_listCornerPoint;
    CCornerDistProcess *m_dot;
    CDistDotProcess *m_dotDist;
 
 
    CComboBox m_combFrirtRefer;          //First Refer
 
    Point2I m_topMark;
    Point2I m_botMark;
    Point2I m_topPoint;
    Point2I m_botPoint;
 
    int m_id;
    CString m_strName;
    Point2I m_pos;
    int m_refer;
    int m_refer_;
 
    CComboBox m_combDistMode;
    int m_minValue;
    int m_maxValue;
    int m_incValue;
 
    CComboBox m_combDistMode2;
    int m_minValue2;
    int m_maxValue2;
    int m_incValue2;
 
    //
    DimensionDir m_eDir;
    int m_eDotIndex;
 
    CMenu m_visionMenu;
 
    CComboBox m_combNgType;
    CComboBox m_combNgType2;
 
private:
    BOOL m_isLockPoint;
 
private:
    //1. ÏÔʾËùÓеIJÎÊý
    void dispListParam(void);
 
    //2. ³õʼ»¯µãλ½çÃæ
    void InitPointUi(void);
 
    //4. ³õʼ»¯UI½çÃæ
    void InitWindUi(void);
 
    //5. Ö´ÐÐ
    void ChangeVisionType(DimensionDir eDir);
 
    //6. Ö´ÐÐ
    void ChangeCornerDotIdx(int eIdx);
 
    //7. ±£´æÊý¾Ý
    void SaveDistCorner(void);
 
    //8. ÏÔʾµ±Ç°µÄÊý¾Ý
    void ShowDistCornerParam(void);
 
    //9. ±£´æÊý¾Ý
    void SaveDistDotProcess(void);
 
    //10. ÏÔʾµ±Ç°µÄÊÓ¾õ²ÎÊý
    void ShowDistDotParam(void);
 
    //11. ÏÔÊ¾ÇøÓò
    void dispRegion(void);
 
    //12. Ëø²Ù×÷
    void LockImage(int nType);
 
    //14. ÏÔʾËùÓеÄËùÓеÄÊÓ¾õ¼ì²âµã
    void dispAllPointResult(void);
 
    //17. ¼ÏËøMARK
    void LockMark(BOOL isLock);
 
    //18. ³õʼ»¯²Ëµ¥
    void InitMenu(void);
 
public:
    virtual BOOL OnInitDialog();
    afx_msg void OnClose();
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    int setDimensionDir(DimensionDir eDir);
    afx_msg void OnNMClickListDistDot(NMHDR *pNMHDR, LRESULT *pResult);
    afx_msg void OnBnClickedButtonModelRoi();
    afx_msg void OnBnClickedButtonMeasureRoi();
    afx_msg void OnBnClickedButtonDistTestAll();
    afx_msg void OnBnClickedButtonLockMarkDist();
    afx_msg void OnBnClickedButtonCopyTopMarkDist();
    afx_msg void OnNMRClickListDistDot(NMHDR *pNMHDR, LRESULT *pResult);
    afx_msg void OnVisionDelete();
    afx_msg void OnAddDist();
    afx_msg void OnMenuMeasureSet();
    afx_msg void OnEditroiDrawkeyroi();
    afx_msg void OnEditroiDrawmeasureroi();
    afx_msg void OnEditroiDeleteallroi();
};