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

📄 focolordialog.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_FOCOLORDIALOG_H__2C04B373_E5F7_11D5_A4B9_525400EA266C__INCLUDED_)
#define AFX_FOCOLORDIALOG_H__2C04B373_E5F7_11D5_A4B9_525400EA266C__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CFOColorDialog dialog
#include "FOColorButton.h"
#include "FODropPaletteWnd.h"
#include "FOImageStatic.h"
#include "FOHyperLink.h"

class CFOColorDialog : public CDialog
{
// Construction
public:
	CFOColorDialog(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CFOColorDialog)
	enum { IDD = IDD_FO_COLORPICKER };
	CFOHyperLink	m_newVersion;
	CString	m_strValue;
	//}}AFX_DATA

	CFOImageStatic	m_staticColor;

	// Color select wnd.
	CFODropPaletteWnd	m_wndColor;	

	// Color select button.
	CFOColorButton		m_btnColor;	

	// Get or set the color.
	void	 SetColor(COLORREF cr)	{ crColor = cr; }
	COLORREF GetColor()				{ return crColor; }

	// CreatePalette.
	virtual void CreatePalette(BOOL bRedraw = TRUE);

	// Color palette
	CPalette m_Palette;
protected:

	virtual void StopCapture();		// Capture the mouse.

protected:
	COLORREF	crColor;			// Current color.
	BOOL		m_bCapturing;		// Is capture state.

	HCURSOR		m_hCursor;			// Select color cursor.
	BOOL		m_bPalette;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFOColorDialog)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CFOColorDialog)
	virtual BOOL OnInitDialog();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnFoColorCustom();
	afx_msg void OnSysColorChange();
	afx_msg BOOL OnQueryNewPalette();
	//@cmember
	// Palette management 
	afx_msg void OnPaletteChanged(CWnd* pFocusWnd);	afx_msg void OnDestroy();
	//}}AFX_MSG
	// when select day -> OK
	afx_msg LONG	OnSelectDayOK(UINT wParam, LONG lParam);

	// when slect custom
	afx_msg LONG	OnSelectCustom(UINT wParam, LONG lParam);
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_FOCOLORDIALOG_H__2C04B373_E5F7_11D5_A4B9_525400EA266C__INCLUDED_)

⌨️ 快捷键说明

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