Click here to Skip to main content
15,893,508 members
Articles / Desktop Programming / MFC

EZOptionsDlg - Netscape Preferences like dialog

Rate me:
Please Sign up or sign in to vote.
4.38/5 (4 votes)
16 Apr 2001 121K   3.1K   45  
A modified property sheet with the tree control replacing the tabs.
#if !defined(AFX_EZPAGELABEL_H__BB711F8B_9043_4A2B_AC02_8236A1C4A985__INCLUDED_)
#define AFX_EZPAGELABEL_H__BB711F8B_9043_4A2B_AC02_8236A1C4A985__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CEZPageLabel window

class CEZPageLabel : public CStatic
{
// Construction
public:
	CEZPageLabel();

// Attributes
public:

	void SetFont(CString strFontName, int nHeight);
	const CFont& GetFont() const{return m_font;}

	void SetTextColor(COLORREF clrText){m_clrText =	clrText;}
	COLORREF GetTextColor() const{return m_clrText;}

	COLORREF GetGradientStart() const{return m_clrStart;}
	COLORREF GetGradientEnd() const{return m_clrEnd;}

	void SetGradientStart(COLORREF clrStart) {m_clrStart = clrStart;}
	void SetGradientEnd(COLORREF clrEnd) {m_clrEnd = clrEnd;}

	
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CEZPageLabel)
	protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetColors(COLORREF clrStart,COLORREF clrEnd,COLORREF clrText);
	
	virtual ~CEZPageLabel();

	// Generated message map functions
protected:
	//{{AFX_MSG(CEZPageLabel)
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
protected:
	
	virtual void DrawGradient(CDC* pDC, CRect& rcGrad, COLORREF clrStart, COLORREF clrEnd);
	virtual void PaintBk(CDC& dc);
	COLORREF m_clrStart;
	COLORREF m_clrEnd;
	COLORREF m_clrText;
	CFont m_font;
	CBitmap m_bmpBk;
	static CString sm_strLabelClass;
};

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

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

#endif // !defined(AFX_EZPAGELABEL_H__BB711F8B_9043_4A2B_AC02_8236A1C4A985__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions