-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchDialog.h
More file actions
59 lines (51 loc) · 1.3 KB
/
SearchDialog.h
File metadata and controls
59 lines (51 loc) · 1.3 KB
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
#pragma once
class OwnerDrawButton
{
public:
int State = 0;
int MouseState = 0;
};
typedef struct SearchDlgPos {
RECT m_oRect; //orig size
RECT m_nRect; //new size
LOGFONT m_oFontData; //orig font
LOGFONT m_nFontData; //new font
HFONT m_hFont; //font to change to
int m_at = 0; //counter for enum
RECT m_oCtrlRects[13]; //children orig position, num items should match the ctrl count in the dialog
} SEARCHDLGPOS;
class SearchDialog
{
public:
HWND m_hDlg = NULL;
HWND m_hParent = NULL;
int m_CheckTimer = 0;
HWND m_HasAnHover = NULL;
OwnerDrawButton m_SearchDropDownBut;
OwnerDrawButton m_SearchLeftBut;
OwnerDrawButton m_SearchRightBut;
OwnerDrawButton m_SearchCaseBut;
OwnerDrawButton m_SearchWordBut;
OwnerDrawButton m_CloseSearchBut;
OwnerDrawButton m_ReplaceDropDownBut;
OwnerDrawButton m_ReplaceLeftBut;
OwnerDrawButton m_ReplaceRightBut;
OwnerDrawButton m_ReplaceCurrentBut;
OwnerDrawButton m_ReplaceAllBut;
SEARCHDLGPOS m_PosData;
public:
SearchDialog();
~SearchDialog();
void Init(HWND hParent);
void Show(DWORD ShowStyle = SW_SHOW);
void Hide();
bool IsVisible();
bool IsPtOverDlg(POINT pt);
void Kill();
void UpdatePosition();
wstring GetSearchText();
wstring GetReplaceText();
void ForceRefresh();
void ResizeToParentFont(HFONT hFnt);
void GetInitialPositions();
};