-
Notifications
You must be signed in to change notification settings - Fork 0
/
SnapshotDlg.h
130 lines (115 loc) · 3.75 KB
/
SnapshotDlg.h
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
#pragma once
#include "SSnapshotCtrl.h"
#include "IWordSizeAdapterCallback.h"
class CSnapshotDlg : public SHostDialog
, public IWordSizeAdapterCallback
{
struct EncoderInf {
EncoderInf(wstring _name, CLSID _id):name(_name), id(_id){}
EncoderInf() {}
wstring name;
CLSID id;
};
public:
~CSnapshotDlg(void);
CSnapshotDlg(void);
public:
virtual void OnClickItem(int nIndex);
protected:
SStringT & CreateNewFileName(SStringT &filename);
void EnumEncoder(std::vector<EncoderInf>& encoderList);
std::wstring &GetEncoderStringFilter(std::wstring &strFilter);
bool GetEncodeCLSID(int filterIdx, CLSID & clsId);
bool OnEventCapturing(EventCapturing* pEvt);
bool OnEventReCaptured(EventReCap* pEvt);
bool OnEventRectMoving(EventRectMoving* pEvt);
bool OnEventRectCaptured(EventRectCaptured* pEvt);
bool OnEventRectDbClk(EventRectDbClk* pEvt);
void OnBnClickRect();
void OnBnClickEllipse();
void OnBnClickArrow();
void OnBnClickDoodle();
void OnBnClickMask();
void OnBnClickWord();
void OnBnClickRevoke();
void OnBnClickCopy();
void OnBnClickSave();
void OnBnClickCancel();
void OnBnClickFinish();
void OnBnClickSmallDot();
void OnBnClickMiddleDot();
void OnBnClickBigDot();
void OnBnClickC1();
void OnBnClickC2();
void OnBnClickC3();
void OnBnClickC4();
void OnBnClickC5();
void OnBnClickC6();
void OnBnClickC7();
void OnBnClickC8();
void OnBnClickC9();
void OnBnClickC10();
void OnBnClickC11();
void OnBnClickC12();
void OnBnClickC13();
void OnBnClickC14();
void OnBnClickC15();
void OnBnClickC16();
void OnBnClickC17();
void OnBnClickC18();
void OnBnClickC19();
void OnBnClickC20();
protected:
EVENT_MAP_BEGIN()
EVENT_NAME_COMMAND(L"btn_rect", OnBnClickRect)
EVENT_NAME_COMMAND(L"btn_ellipse", OnBnClickEllipse)
EVENT_NAME_COMMAND(L"btn_arrow", OnBnClickArrow)
EVENT_NAME_COMMAND(L"btn_doodle", OnBnClickDoodle)
EVENT_NAME_COMMAND(L"btn_mask", OnBnClickMask)
EVENT_NAME_COMMAND(L"btn_word", OnBnClickWord)
EVENT_NAME_COMMAND(L"btn_revoke", OnBnClickRevoke)
EVENT_NAME_COMMAND(L"btn_copy", OnBnClickCopy)
EVENT_NAME_COMMAND(L"btn_save", OnBnClickSave)
EVENT_NAME_COMMAND(L"btn_cancel", OnBnClickCancel)
EVENT_NAME_COMMAND(L"btn_finish", OnBnClickFinish)
EVENT_NAME_COMMAND(L"btn_smalldot", OnBnClickSmallDot)
EVENT_NAME_COMMAND(L"btn_middledot", OnBnClickMiddleDot)
EVENT_NAME_COMMAND(L"btn_bigdot", OnBnClickBigDot)
EVENT_NAME_COMMAND(L"btn_c1", OnBnClickC1)
EVENT_NAME_COMMAND(L"btn_c2", OnBnClickC2)
EVENT_NAME_COMMAND(L"btn_c3", OnBnClickC3)
EVENT_NAME_COMMAND(L"btn_c4", OnBnClickC4)
EVENT_NAME_COMMAND(L"btn_c5", OnBnClickC5)
EVENT_NAME_COMMAND(L"btn_c6", OnBnClickC6)
EVENT_NAME_COMMAND(L"btn_c7", OnBnClickC7)
EVENT_NAME_COMMAND(L"btn_c8", OnBnClickC8)
EVENT_NAME_COMMAND(L"btn_c9", OnBnClickC9)
EVENT_NAME_COMMAND(L"btn_c10", OnBnClickC10)
EVENT_NAME_COMMAND(L"btn_c11", OnBnClickC11)
EVENT_NAME_COMMAND(L"btn_c12", OnBnClickC12)
EVENT_NAME_COMMAND(L"btn_c13", OnBnClickC13)
EVENT_NAME_COMMAND(L"btn_c14", OnBnClickC14)
EVENT_NAME_COMMAND(L"btn_c15", OnBnClickC15)
EVENT_NAME_COMMAND(L"btn_c16", OnBnClickC16)
EVENT_NAME_COMMAND(L"btn_c17", OnBnClickC17)
EVENT_NAME_COMMAND(L"btn_c18", OnBnClickC18)
EVENT_NAME_COMMAND(L"btn_c19", OnBnClickC19)
EVENT_NAME_COMMAND(L"btn_c20", OnBnClickC20)
EVENT_MAP_END()
protected:
BOOL OnInitDialog(HWND wnd, LPARAM lInitParam);
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
void OnRButtonUp(UINT nFlags, CPoint point);
BEGIN_MSG_MAP_EX(CSnapshotDlg)
MSG_WM_INITDIALOG(OnInitDialog)
MSG_WM_KEYDOWN(OnKeyDown)
MSG_WM_RBUTTONUP(OnRButtonUp)
CHAIN_MSG_MAP(SHostDialog)
END_MSG_MAP()
private:
std::map<int, COLORREF> m_mapColorInfo;
int m_nSelectSize;
private:
void SetSelectedColor(int nIndex);
std::vector<EncoderInf> m_encoderList;
};