-
Notifications
You must be signed in to change notification settings - Fork 2
/
ChooseColorDialog.h
38 lines (27 loc) · 980 Bytes
/
ChooseColorDialog.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
#pragma once
#include "BaseColorDialog.h"
#include "ChooseColorStatic.h"
#include "ColorDialogCallback.h"
// CChooseColorDialog dialog
class CChooseColorDialog : public CBaseColorDialog, public IColorDialogCallback
{
public:
CChooseColorDialog(CWnd* pParent = NULL); // standard constructor
// IColorDialogCallback
void OnColorClick(BYTE bIndex, int nID, BOOL fLeftClick);
void Init(const EGACOLOR *pPalette) { _pPalette = pPalette; m_wndStatic.SetPalette(_pPalette); }
BYTE GetColor() { return _bChoice; }
void SetColor(BYTE bChoice) { _bChoice = bChoice; m_wndStatic.SetSelection(bChoice); }
virtual ~CChooseColorDialog();
// Dialog Data
enum { IDD = IDD_DIALOGCOLOR };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
CChooseColorStatic m_wndStatic;
// Visuals
CExtLabel m_wndDescription;
CExtButton m_wndCancel;
const EGACOLOR *_pPalette;
BYTE _bChoice;
};