-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainDlg.h
67 lines (58 loc) · 2.49 KB
/
MainDlg.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
#pragma once
#include "resource.h"
#include "view.h"
class CMainDlg : public CDialogImpl<CMainDlg>,
public CMessageFilter,
public CDialogResize<CMainDlg> {
public:
enum { IDD = IDD_MAINDLG };
enum {
UWM_PROGRESS = WM_APP,
UWM_ENUM_SYMBOLS_DONE,
};
BEGIN_DLGRESIZE_MAP(CMainDlg)
DLGRESIZE_CONTROL(IDC_STATIC_ENGINE_DIR, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_ENGINE_DIR, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_STATIC_SYMBOLS_DIR, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_SYMBOLS_DIR, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_STATIC_SYMBOL_SERVER, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_SYMBOL_SERVER, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_STATIC_TARGET_EXECUTABLE, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_TARGET_EXECUTABLE, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_PICKFILE, DLSZ_MOVE_X)
DLGRESIZE_CONTROL(IDC_STATIC_RESULTS, DLSZ_SIZE_X)
DLGRESIZE_CONTROL(IDC_RESULTS, DLSZ_SIZE_X | DLSZ_SIZE_Y)
DLGRESIZE_CONTROL(IDOK, DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(ID_APP_ABOUT, DLSZ_CENTER_X | DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(IDCANCEL, DLSZ_MOVE_X | DLSZ_MOVE_Y)
END_DLGRESIZE_MAP()
private:
BEGIN_MSG_MAP(CMainDlg)
CHAIN_MSG_MAP(CDialogResize<CMainDlg>)
MSG_WM_INITDIALOG(OnInitDialog)
MSG_WM_DESTROY(OnDestroy)
MSG_WM_DROPFILES(OnDropFiles)
COMMAND_ID_HANDLER_EX(IDC_PICKFILE, OnPickFile)
COMMAND_ID_HANDLER_EX(ID_APP_ABOUT, OnAppAbout)
COMMAND_ID_HANDLER_EX(IDOK, OnOK)
COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
MESSAGE_HANDLER_EX(UWM_PROGRESS, OnProgress)
MESSAGE_HANDLER_EX(UWM_ENUM_SYMBOLS_DONE, OnEnumSymbolsDone)
CHAIN_COMMANDS_MEMBER(m_resultsEdit)
END_MSG_MAP()
BOOL PreTranslateMessage(MSG* pMsg) override;
BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam);
void OnDestroy();
void OnDropFiles(HDROP hDropInfo);
void OnPickFile(UINT uNotifyCode, int nID, CWindow wndCtl);
void OnAppAbout(UINT uNotifyCode, int nID, CWindow wndCtl);
void OnOK(UINT uNotifyCode, int nID, CWindow wndCtl);
void OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl);
LRESULT OnProgress(UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT OnEnumSymbolsDone(UINT uMsg, WPARAM wParam, LPARAM lParam);
HACCEL m_accelerator = nullptr;
CEditView m_resultsEdit;
CFont m_resultsEditFont;
std::optional<std::jthread> m_enumSymbolsThread;
CString m_enumSymbolsResult;
};