Click here to Skip to main content
11,492,962 members (60,011 online)
Click here to Skip to main content
Add your own
alternative version

CGridCtrl 1.5

, 17 Jun 2004 100.5K 5.3K 40
This article presents a tiny grid control derived from the standard list control
#pragma once

#include "CGridCtrl.h"

#define CHECK_COUNT	9

//
//	class BgListView
//
class BgListView: public CGridCtrl
{
public:
	BgListView();

protected:
	void OnGetComboBoxItems(IN  int Row,
							IN  int Col,
							OUT bool& HasImages,
							OUT CStringList& Items,
							OUT CArray<int, int>& Images);

	bool OnGetCellColors(	IN  int Row,
							IN  int Col,
							OUT COLORREF& TextColor,
							OUT COLORREF& BkColor,
							OUT UINT8& TextStyle) const;

	CellType OnGetCellType(	IN int Row,
							IN int Col);

	void OnCheckBoxClick(	IN int Row,
							IN int Col);

	void OnCustomCellClick(	IN int Row,
							IN int Col);

	virtual void	PreSubclassWindow(void);
	virtual void	OnDestroy();

	void OnCellRBtnUp(		IN int Row,
							IN int Col,
							IN const RECT *CellRect,
							IN const CPoint& Point);

private:
	void AdjustBrightness(	IN OUT COLORREF& Color,
							IN INT16 Amount) const;

private:
	bool mChecks[CHECK_COUNT];
	CMenu mMenu;

};

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

Marius Negrutiu
Web Developer
Romania Romania
- C/C++ Programming
- Windows Device Driver programming (DDK)
- Low-level networking programmer (firewalls, routers, sniffers...)
- AutoCAD ObjectARX/DBX programming
- ADT Object Modeling Framework (OMF) programmer

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150520.1 | Last Updated 18 Jun 2004
Article Copyright 2004 by Marius Negrutiu
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid