-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathChooseColorDialog.cpp
57 lines (42 loc) · 1.16 KB
/
ChooseColorDialog.cpp
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
// ChooseColorDialog.cpp : implementation file
//
#include "stdafx.h"
#include "SCIPicEditor.h"
#include "ChooseColorDialog.h"
// CChooseColorDialog dialog
CChooseColorDialog::CChooseColorDialog(CWnd* pParent /*=NULL*/)
: CBaseColorDialog(CChooseColorDialog::IDD, pParent)
{
_pPalette = NULL;
_bChoice = 0;
// 40 things here.
m_wndStatic.SetRowsAndColumns(5, 8);
m_wndStatic.ShowSelection(TRUE);
}
CChooseColorDialog::~CChooseColorDialog()
{
}
void CChooseColorDialog::DoDataExchange(CDataExchange* pDX)
{
CBaseColorDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_CHOOSECOLORSTATIC, m_wndStatic);
m_wndStatic.SetCallback(this);
// Visuals
DDX_Control(pDX, IDC_DIALOGDESCRIPTION, m_wndDescription);
DDX_Control(pDX, IDCANCEL, m_wndCancel);
}
BEGIN_MESSAGE_MAP(CChooseColorDialog, CBaseColorDialog)
ON_WM_KEYDOWN()
ON_WM_KILLFOCUS()
ON_WM_ACTIVATE()
END_MESSAGE_MAP()
void CChooseColorDialog::OnColorClick(BYTE bIndex, int nID, BOOL fLeftClick)
{
if (fLeftClick)
{
// We only have one child - it must have been it.
SetColor(bIndex);
_fEnded = TRUE;
EndDialog(IDOK);
}
}