Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

An LED Style display control and bar control

, 17 Jan 2000
A control to display time, floating point numbers or integers using an LED digital-style display
staticcounter_demo.zip
CStaticCounterEx
Release
StaticCounterExDemo.exe
RES
StaticCounterExDemo.ico
Test.psp
StaticCounterExDemo.clw
StaticCounterExDemo.dsp
StaticCounterExDemo.dsw
StaticCounterExDemo.stt
staticcounter_src.zip
// 3DBar.h: interface for the C3DBar class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_3DBAR_H__E77033B8_CCDE_11D3_8041_00805FC1DE10__INCLUDED_)
#define AFX_3DBAR_H__E77033B8_CCDE_11D3_8041_00805FC1DE10__INCLUDED_

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

#include "../stdafx.h"

class C3DBar  
{
public:
	void SetBarColour(COLORREF cr);
	void UpdateColours();
	void CreatePens();
	void DrawHorizontal(CDC* pDC, CRect& BarRect);

	C3DBar();
	virtual ~C3DBar();

protected:
	void DeletePens();
	COLORREF DarkenColor(const COLORREF crColor, BYTE byReduceVal);
	COLORREF LightenColor(const COLORREF crColor, BYTE byIncreaseVal);
	COLORREF m_crChannel;
	COLORREF m_crColorLight;
	COLORREF m_crColorLighter;
	COLORREF m_crColorLightest;
	COLORREF m_crColorDark;
	COLORREF m_crColorDarker;
	COLORREF m_crDkShadow;
	COLORREF m_crShadow;
	COLORREF m_crLiteShadow;

	CPen m_penColor;
	CPen m_penColorLight;
	CPen m_penColorLighter;
	CPen m_penColorDark;
	CPen m_penColorDarker;
	CPen m_penDkShadow;
	CPen m_penShadow;
	CPen m_penLiteShadow;
};

#endif // !defined(AFX_3DBAR_H__E77033B8_CCDE_11D3_8041_00805FC1DE10__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

Share

About the Author

Jason Troitsky

United Kingdom United Kingdom
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 18 Jan 2000
Article Copyright 2000 by Jason Troitsky
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid