2D array of CRect

Posted on 2008-10-21
Last Modified: 2013-11-20

Can anybody tell me how to create a two dimensional array of CRect objects in an MFC application?

Question by:IssacJones
1 Comment

Accepted Solution

tg_wilk earned 250 total points
ID: 22773001
the normal way?

CRect MyArray [5][5]; //5x5 array
//and you can access the elements like this;
for (int i=0; i<5; i++)
   for (int j=0; j<5; j++)
      CRect rectangle = MyArray[i][j];

Open in new window


Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
recursion example 16 126
Problem to open Excel file 15 134
Re-position sub-options beneath the TAB 7 88
Math Equation 23 88
Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question