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

Custom Control Graph and Process Bar

, 13 Dec 2006
An article on a Win32 custom graph control and process bar creation.
customcontroldemo_src.zip
Sun_Check_DLL_src
Sun_Check_DLL
small.ico
Sun_Check_DLL.dsp
Sun_Check_DLL.dsw
Sun_Check_DLL.ico
customcontrol_demo.zip
Graph_dll.dll
Sun_Check_DLL.exe
customcontrol_dll_src.zip
Graph_dll_src
Graph_dll
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>


#define VER_LINE_GAP			2
#define NO_OF_GRAPH				4
#define	GRAPH_GAP				6
#define NO_OF_BAR_PARTS			4
#define CENTER_VAL				2.5
#define LINE_GAP_LEN			3
#define BUF_LEN					20
#define VER_MAX_MOV				20
#define GRAPH_HEADER_LOC		20
#define NO_OF_POINTS			30
#define DARK_GREEN				125
#define LIGHT_GREEN				255
#define WM_USER_GRAPH           0x0401
#define WM_USER_PROCESS_BAR		0x0402
#define CUST_GRAPH_CLASS_NAME	"Custom_Control"

struct Health_Graph
{
	long	RxBytes;
	long	TxBytes;
};

struct lp
{
	unsigned long RxValue;
	unsigned long TxValue;
	unsigned int  GraphNo;
};

struct Health_Graph GraphInfo[NO_OF_GRAPH][NO_OF_POINTS];
struct lp *User_Data;

LONG64 TotalRxBytes, TotalTxBytes;
unsigned int MaxRx, MaxTx;

void DrawGraph(HDC hdc, RECT Rect);
void UpdateGraph(HDC hdc, RECT Rect, unsigned long RxValue, unsigned long TxValue, int GraphNo);
void DrawBar(HDC hdc, RECT Rect, int Process_Value);

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

Shanmuga Sundar.V
Architect
India India
Module Lead working in leading MNC company, india - bangalore.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 13 Dec 2006
Article Copyright 2006 by Shanmuga Sundar.V
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid