-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStylesDialog.h
More file actions
62 lines (53 loc) · 1.38 KB
/
Copy pathStylesDialog.h
File metadata and controls
62 lines (53 loc) · 1.38 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
59
60
61
62
#pragma once
#include <stddef.h>
#include <Windows.h>
#include <CommCtrl.h>
typedef void (CALLBACK * STYLEDIALOGAPPLY)(void *, DWORD, DWORD);
struct STYLEBITMAP
{
PCTSTR name;
DWORD style_bit;
};
typedef struct STYLEBITMAP STYLEBITMAP;
struct STYLESDIALOGPARAM
{
DWORD style;
DWORD extend_style;
STYLEDIALOGAPPLY callback;
void *callback_param;
};
typedef struct STYLESDIALOGPARAM STYLESDIALOGPARAM;
class StylesDialog
{
private:
intptr_t p_ref;
HWND p_dialog;
HWND p_parent;
HWND p_style_list;
HWND p_extend_style_list;
DWORD p_style;
DWORD p_extend_style;
STYLEDIALOGAPPLY p_callback;
void * p_callback_param;
bool p_do_apply;
static const STYLEBITMAP basic_window_styles[16];
static const STYLEBITMAP extend_window_styles[22];
static const LVCOLUMN dummycolumn;
private:
StylesDialog(HWND);
~StylesDialog();
public:
// COMっぽく実装してみるが、QueryInterfaceは無かったことになった。
intptr_t AddRef();
intptr_t Release();
static INT_PTR CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
private:
void do_destroy();
void do_notify(NMHDR *);
void do_initdialog(LPARAM);
void do_timer(UINT_PTR);
//void do_command(WORD, WORD, HWND);
void get_styles(DWORD *,DWORD *);
static DWORD get_checked_styles(HWND);
static void add_styles(HWND, DWORD, const STYLEBITMAP[], unsigned char);
};