Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralC++ Image Pin
13-Mar-02 13:49
suss13-Mar-02 13:49 
GeneralRe: C++ Image Pin
Christian Graus13-Mar-02 13:55
protectorChristian Graus13-Mar-02 13:55 
GeneralClear all message from the queue Pin
13-Mar-02 12:23
suss13-Mar-02 12:23 
GeneralRe: Clear all message from the queue Pin
Joaquín M López Muñoz13-Mar-02 12:34
Joaquín M López Muñoz13-Mar-02 12:34 
GeneralIStream & CFile Pin
AJ12313-Mar-02 12:00
AJ12313-Mar-02 12:00 
GeneralCollection Class Question Pin
CDuddley13-Mar-02 11:13
CDuddley13-Mar-02 11:13 
GeneralRe: Collection Class Question Pin
Christian Graus13-Mar-02 11:24
protectorChristian Graus13-Mar-02 11:24 
GeneralRe: Collection Class Question Pin
Joaquín M López Muñoz13-Mar-02 11:31
Joaquín M López Muñoz13-Mar-02 11:31 
If what you mean is how to have a CObList of 100 elements, you would have to insert them one by one using CObList::AddTail. The following restrictrions apply:
  1. What you store are not CObjects, but pointers to CObject created with new (CObList assumes responsibility for deleteing them later). In particular, you cannot store simple types like ints or structs not deriving from CObject.
  2. When you retrieve an object stored in a CObList (well, a pointer to it), you have to figure out its actual type and downcast (most usually what you store are not CObjects but some other class derive from this type.)
If you don't mind me evangelizing just a little about STL, why don't you give std::vector or std::list a try? They are way more robust than MFC containers, platform-independent and a lot of fun Smile | :) Plus, Christian Grauss is writing a series of tutorials on STL to help newbies make a warm start.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 11:37
CDuddley13-Mar-02 11:37 
GeneralRe: Collection Class Question Pin
Joaquín M López Muñoz13-Mar-02 11:44
Joaquín M López Muñoz13-Mar-02 11:44 
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 11:52
CDuddley13-Mar-02 11:52 
GeneralRe: Collection Class Question Pin
Christian Graus13-Mar-02 12:04
protectorChristian Graus13-Mar-02 12:04 
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 12:14
CDuddley13-Mar-02 12:14 
GeneralRe: Collection Class Question Pin
Joaquín M López Muñoz13-Mar-02 12:19
Joaquín M López Muñoz13-Mar-02 12:19 
GeneralRe: Collection Class Question Pin
CDuddley13-Mar-02 14:19
CDuddley13-Mar-02 14:19 
GeneralRe: Collection Class Question Pin
Tim Smith13-Mar-02 11:38
Tim Smith13-Mar-02 11:38 
GeneralWM_GETMINMAXINFO Pin
13-Mar-02 10:55
suss13-Mar-02 10:55 
GeneralRe: WM_GETMINMAXINFO Pin
Derek Waters13-Mar-02 11:33
Derek Waters13-Mar-02 11:33 
GeneralRe: WM_GETMINMAXINFO Pin
13-Mar-02 11:43
suss13-Mar-02 11:43 
GeneralRe: WM_GETMINMAXINFO Pin
Tim Smith13-Mar-02 11:42
Tim Smith13-Mar-02 11:42 
GeneralVC++ in Visual Studio.NET Pin
Rick Crone13-Mar-02 10:36
Rick Crone13-Mar-02 10:36 
GeneralRe: VC++ in Visual Studio.NET Pin
Bill Wilson13-Mar-02 14:24
Bill Wilson13-Mar-02 14:24 
GeneralRe: VC++ in Visual Studio.NET Pin
Rick Crone14-Mar-02 2:59
Rick Crone14-Mar-02 2:59 
GeneralRe: VC++ in Visual Studio.NET Pin
Bill Wilson14-Mar-02 6:16
Bill Wilson14-Mar-02 6:16 
GeneralRe: VC++ in Visual Studio.NET Pin
Rick Crone14-Mar-02 9:19
Rick Crone14-Mar-02 9:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.