-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSettingsWordsDlg.h
61 lines (51 loc) · 2.08 KB
/
SettingsWordsDlg.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
// SettingsWordsDlg.h : Declaration of the CSettingsWordsDlg
#pragma once
#include "resource.h"
class WordsItem;
// CSettingsWordsDlg
class CSettingsWordsDlg : public CDialogImpl<CSettingsWordsDlg>
{
public:
CListViewCtrl m_list_words;
CButton m_btn_add;
CEdit m_edt_new;
CEdit m_edit;
CButton m_chk_all;
CButton m_show_words_excls;
int m_sort;
bool m_sel_all;
DWORD m_ct;
int m_editidx;
CSimpleArray<WordsItem> m_words;
CSettingsWordsDlg();
enum { IDD = IDD_SETTINGS_WORDS };
BEGIN_MSG_MAP(CSettingsWordsDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
NOTIFY_HANDLER(IDC_LIST_WORDS, LVN_GETDISPINFO, OnListDispInfo)
NOTIFY_HANDLER(IDC_LIST_WORDS, LVN_COLUMNCLICK, OnListSort)
COMMAND_HANDLER(IDC_BUTTON_ADD, BN_CLICKED, OnBnClickedButtonAdd)
NOTIFY_CODE_HANDLER(NM_CUSTOMDRAW, OnCustomDraw)
COMMAND_HANDLER(IDC_CHECK_SELALL, BN_CLICKED, OnBnClickedCheckSelall)
COMMAND_HANDLER(IDC_BUTTON_REMOVESEL, BN_CLICKED, OnBnClickedButtonRemovesel)
NOTIFY_HANDLER(IDC_LIST_WORDS, NM_CLICK, OnListClick)
NOTIFY_HANDLER(IDC_WLIST, LVN_ITEMCHANGED, OnListChanged)
NOTIFY_HANDLER(IDC_EDIT_LV, EN_KILLFOCUS, OnEditLVDefocused)
COMMAND_ID_HANDLER(IDOK, OnOK)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
END_MSG_MAP()
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnListDispInfo(int, NMHDR*, BOOL&);
LRESULT OnListSort(int, NMHDR*, BOOL&);
LRESULT OnListClick(int, NMHDR*, BOOL&);
LRESULT OnListChanged(int, NMHDR*, BOOL&);
LRESULT OnEditLVDefocused(int, NMHDR*, BOOL&);
LRESULT OnCustomDraw(int id,NMHDR *hdr,BOOL&);
LRESULT OnOK(WORD, WORD wID, HWND, BOOL&);
LRESULT OnCancel(WORD, WORD wID, HWND, BOOL&);
// void CreateStatBitmaps();
bool AddNewWord(CString&, bool test = false);
void RemoveWord(int);
LRESULT OnBnClickedButtonAdd(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnBnClickedCheckSelall(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnBnClickedButtonRemovesel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
};