summaryrefslogtreecommitdiff
path: root/win/clrpick.h
blob: e141380a5db0e98f3e8223e4424e411b69eb7e9f (plain)
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
68
69
70
71
72
73
74
75
#if !defined(AFX_COLOURPICKER_H__D0B75901_9830_11D1_9C0F_00A0243D1382__INCLUDED_)
#define AFX_COLOURPICKER_H__D0B75901_9830_11D1_9C0F_00A0243D1382__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

// ColorPicker.h : header file
//

#include "ClrPopup.h"

/////////////////////////////////////////////////////////////////////////////
// CColorPicker window

//void AFXAPI DDX_ColorPicker(CDataExchange *pDX, int nIDC, COLORREF& crColor);

class CColorPicker : public CButton
{
// Construction
public:
    CColorPicker();
    DECLARE_DYNCREATE(CColorPicker);

// Attributes
public:
	int GetColorIndex();
	void SetColorIndex(int nColor); 
	BOOL m_bDefaultText;
	BOOL m_bCustomText;
	
// Operations
public:

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CColorPicker)
	public:
    virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	protected:
    virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
    virtual ~CColorPicker();

protected:
    void SetWindowSize();

// protected attributes
protected:
    BOOL m_bActive; // Is the dropdown active?
    CRect m_ArrowRect;
	int m_nColor;
    COLORREF m_crColor;

    // Generated message map functions
protected:
    //{{AFX_MSG(CColorPicker)
    afx_msg BOOL OnClicked();
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    //}}AFX_MSG
    afx_msg LONG OnSelEndOK(UINT lParam, LONG wParam);
    afx_msg LONG OnSelEndCancel(UINT lParam, LONG wParam);

    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_COLOURPICKER_H__D0B75901_9830_11D1_9C0F_00A0243D1382__INCLUDED_)