Click here to Skip to main content
12,635,802 members (25,279 online)
Click here to Skip to main content

Stats

54K views
2.4K downloads
43 bookmarked
Posted

Bar Graph Control

, 5 Feb 2007 CPOL
A useful bar graph control, derived from CStatic.
// MyStatic.cpp : implementation file
//

#include "stdafx.h"
#include "GraphTest.h"
#include "MyStatic.h"
#include ".\mystatic.h"


// CMyStatic

IMPLEMENT_DYNAMIC(CMyStatic, CStatic)
CMyStatic::CMyStatic()
{
	stColor = RGB(0,0,0);
}

CMyStatic::~CMyStatic()
{
}


BEGIN_MESSAGE_MAP(CMyStatic, CStatic)
	ON_WM_PAINT()
END_MESSAGE_MAP()



// CMyStatic message handlers


void CMyStatic::OnPaint()
{
	CPaintDC dc(this); // device context for painting
	// TODO: Add your message handler code here
	// Do not call CStatic::OnPaint() for painting messages
	RECT rc;
	GetClientRect(&rc);
	dc.FillSolidRect(&rc, stColor);
}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Shaibujan
Team Leader
India India
Mr. Shaibujan has got 9+ yrs of programming experience in C/C++, on various domains like Cryptography, Biometric Security, Network Security, Pattern Recognition, Image Processing, MPEG2, MPEG4, H.264, AAC etc.

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161208.2 | Last Updated 6 Feb 2007
Article Copyright 2007 by Shaibujan
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid