⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fodropcolorbutton.h

📁 visual c++ 实例编程
💻 H
字号:
// Copyright UCanCode Software Technology Inc, All Rights Reserved
// You can contact us.
// Support@UCanCode.net
// http://www.ucancode.net
/********************************************************************/
#if !defined(AFX_FODROPCOLORBUTTON_H__76464245_6C7E_11DF_A470_525400EA266C__INCLUDED_)
#define AFX_FODROPCOLORBUTTON_H__76464245_6C7E_11DF_A470_525400EA266C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// FODropColorButton.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CFODropColorButton window
#include "FOPopupColorPaletteWnd.h"

void DDX_FODropColorButton(CDataExchange *pDX, int nIDC, COLORREF& crColor);

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

	// Destruction
	virtual ~CFODropColorButton();
	
	// Attributes
public:
	
	// Get Color
    virtual COLORREF GetColor();

	// Set Color
    virtual void     SetColor(COLORREF crColor); 
	
	// Set notify wnd pointer.
	void SetNotifyWnd(CWnd *pWnd) { pNotifyWnd = pWnd; }

	// Get notify wnd pointer.
	CWnd *GetNotifyWnd() { return pNotifyWnd; }


	// Operations
public:
	
	// Poionter to  Popup Color Palette
	CFOPopupColorPaletteWnd *m_pPopupColorPalette;
	
	// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CFODropColorButton)
public:
    virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
    virtual void PreSubclassWindow();
    //}}AFX_VIRTUAL	
	// Implementation
	
protected:

	//Adjust Window Size
    void AdjustWindowSize();
	
    // Generated message map functions
protected:
    //{{AFX_MSG(CFODropColorButton)
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnPaint();
	afx_msg BOOL OnClicked();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg UINT OnGetDlgCode();
	//}}AFX_MSG
    afx_msg LONG OnSelectColorOK(UINT lParam, LONG wParam);
    afx_msg LONG OnSelectColorCancel(UINT lParam, LONG wParam);
    afx_msg LONG OnSelCustom(UINT lParam, LONG wParam);
    DECLARE_MESSAGE_MAP()
		
protected:

	// Is Force or not
    BOOL			m_bForce; 
	
	// Current color
    COLORREF		m_crCurColor;

	// Arrow Rectangle
	CRect			m_ArrowRect;
protected:

	// Button Rectangle
	CRect			m_rcButton;

	// Popup Size
	CSize			m_szPopup;

	//Is Popup Style Or Not
	BOOL			m_bPopup;

	// The pointer to Notify Window
	CWnd*			pNotifyWnd;
};

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FODROPCOLORBUTTON_H__76464245_6C7E_11DF_A470_525400EA266C__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -