Re: CMap

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thank you for your prompt response. I will try with this.

Do you have any sample on this application to add/removeall elements into
array in map?

Will map with vector give any performance issue? (i mean, application slow
down).

Thanks in advance.

--
Thanks & Regards,
Alex.


"David Wilkinson" wrote:

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

.



Relevant Pages

  • Re: FromHandle purpose with DCs and GDI objects
    ... >>object in the handle map overwriting the existing one if there is one. ... I'm not sure what difference is between Attach CWnd, ... one of the standard MFC collection classes. ... MFC keeps the temporary and permanent window handle map in thread local ...
    (microsoft.public.vc.mfc)
  • Websote problem, probably not browser
    ... On one website there is a map which gives details about specific campsites ... I pull the map up on the website with the window maximized only about the ...
    (microsoft.public.windowsxp.general)
  • Passing information / strings between methods
    ... use HTML links to navigate to places on the map, ... I can then use jQuery to open a popup window (which is ... I want the content of this popup box to reflect the current ... the div before it loads. ...
    (comp.lang.javascript)
  • Re: Network; XP PC is Not Discoverable
    ... The file contained in the email I got from Microsoft to download is entitled ... Network Map. ... click on VIEW FULL MAP.....it shows my Vista PC's but does not show my XP ... At the Bottom of the Window it reads "The Following discovered Device ...
    (microsoft.public.windows.vista.general)
  • Re: 2.4.23aa2 (bugfixes and important VM improvements for the high end)
    ... > OK, I understand you can window it, but I still don't get where your ... 2.7G is what you can map right now in 2.6 with 3:1. ... The last issue that we may run into are apps assuming the stack is at 3G ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)