Click here to Skip to main content
15,886,038 members
Articles / Programming Languages / C++

CGrid Control

Rate me:
Please Sign up or sign in to vote.
4.14/5 (18 votes)
8 May 2007CPOL1 min read 68.6K   5.2K   48  
An article on a grid control built with Windows API. Also includes an MFC class
#include "mergecell.h"

#ifndef _CMERGECELLB_H
#define _CMERGECELLB_H

class CMergeCellB
{
public:
	int						GetMergeCellCount();
	CMergeCell*				GetMergeCell(int index);
	CMergeCell*				GetMergeCell(CellID id);
	CMergeCell*				GetMergeCell(int x, int y);

	CMergeCell*				MergeCells(int x, int y, int cx, int cy, RECT* pRectPos);
	bool					SplitCell(int x, int y);

	void					InsertRow(int y, int cy = 1);
	void					RemoveRow(int y, int cy = 1);
	void					InsertCol(int x, int cx = 1);
	void					RemoveCol(int x, int cx = 1);
protected:
	CMyArray<CMergeCell>	m_aryMerge;
};

#endif

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)


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

Comments and Discussions