Re: CMap
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Fri, 17 Aug 2007 06:16:13 -0400
Alex wrote:
Hi,
Requirement:
I have to display information in two windows like
First Window Info. : struct{BookId,BookName,TotalPages,TotalNoOfWeeks}
Second Window Info: struct{BookId,BookName,PrintedPages,NoOfWeek}
First window displays the book information. and second window displays current status of that particular book. Whenever user clicks on particular book of first window, second window will display the status of that book from the beginning.
this is not real time example. I just tried to simulate my problem. assume, to complete print one book - 10 weeks.First window will have only one entry per book, and second window will have more than one entry per book.
Now, I want to choose collection classes in this scenario. But, It should be optimal solution.
I am planning to choose CMap<BookId,BookId,CArray,CArray>. Is it correct solution?
The first entry of CArray will be the first window information. sencond entry onwards will be second window information.
If you have optimized solution than this, please share with me.
Thanks in advance.
Alex:
I'm not sure I understand the relationship of your map to the problem you describe, but AFAIK it is not possible to put MFC containers (e.g. CArray) in another container (e.g. CMap). If you use the standard library collection classes (std::vector, std::map) you will not have this problem (and you will not have the confusing double template argument either).
--
David Wilkinson
Visual C++ MVP
.
- Follow-Ups:
- Re: CMap
- From: Alex
- Re: CMap
- Prev by Date: Re: Overrides-Messages concept in MFC
- Next by Date: Re: replacing new and delete in MFC application
- Previous by thread: Hook a Hyperlink
- Next by thread: Re: CMap
- Index(es):
Relevant Pages
|