Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: InternetExplorer - BeforeNavigate2 Pin
Michael Dunn27-Sep-01 8:12
sitebuilderMichael Dunn27-Sep-01 8:12 
GeneralRe: InternetExplorer - BeforeNavigate2 Pin
27-Sep-01 8:23
suss27-Sep-01 8:23 
QuestionPassing a CList (or reference to a CList) as a function parameter?? Pin
27-Sep-01 5:34
suss27-Sep-01 5:34 
AnswerRe: Passing a CList (or reference to a CList) as a function parameter?? Pin
Michael Dunn27-Sep-01 8:16
sitebuilderMichael Dunn27-Sep-01 8:16 
GeneralWebBrowser Control & 3D Borders Pin
27-Sep-01 4:43
suss27-Sep-01 4:43 
GeneralRef Counting Pin
User 988527-Sep-01 4:36
User 988527-Sep-01 4:36 
GeneralRe: Ref Counting Pin
Not Active27-Sep-01 6:55
mentorNot Active27-Sep-01 6:55 
GeneralRe: Ref Counting Pin
Joaquín M López Muñoz27-Sep-01 8:28
Joaquín M López Muñoz27-Sep-01 8:28 
If I understood you well, it's some class you're designing (say CYourClass) that has the ref counting methods (AddRef() and Relase or something similar). In this situation, no container, be it from MFC or STL, is going to call that methods automatically if all you store in them is plain pointers to CYourClass. What you should have to do is store instead some suitable smart pointer that does the job of incrementing/decrementing the objects count at construction, destruction and assignment time. Have a look here at CodeProject or any other major programming site to find a wealth of info about smart pointers.
Once you have your smart pointers up and running, both MFC and STL containers will work OK with them. IMHO, however, STL is preferrable because of portability and design issues.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Ref Counting Pin
User 988527-Sep-01 8:52
User 988527-Sep-01 8:52 
GeneralRe: Ref Counting Pin
Joaquín M López Muñoz27-Sep-01 9:28
Joaquín M López Muñoz27-Sep-01 9:28 
QuestionHow to change a item's parent of a tree control? Pin
27-Sep-01 3:52
suss27-Sep-01 3:52 
AnswerRe: How to change a item's parent of a tree control? Pin
Derek Lakin27-Sep-01 4:26
Derek Lakin27-Sep-01 4:26 
GeneralRe: How to change a item's parent of a tree control? Pin
27-Sep-01 15:54
suss27-Sep-01 15:54 
GeneralRe: How to change a item's parent of a tree control? Pin
Derek Lakin27-Sep-01 22:11
Derek Lakin27-Sep-01 22:11 
GeneralContol Bars Pin
27-Sep-01 3:43
suss27-Sep-01 3:43 
QuestionWhat the hell...? Pin
27-Sep-01 3:30
suss27-Sep-01 3:30 
AnswerRe: What the hell...? Pin
Rashid Thadha27-Sep-01 3:37
Rashid Thadha27-Sep-01 3:37 
GeneralThanks!!! Pin
27-Sep-01 3:46
suss27-Sep-01 3:46 
AnswerRe: What the hell...? Pin
Aaron Schaefer27-Sep-01 3:46
Aaron Schaefer27-Sep-01 3:46 
GeneralHot Keys Of Menu In A Dialog Box Pin
Ahmad9927-Sep-01 2:48
Ahmad9927-Sep-01 2:48 
GeneralRe: Hot Keys Of Menu In A Dialog Box Pin
Tomasz Sowinski27-Sep-01 2:54
Tomasz Sowinski27-Sep-01 2:54 
GeneralRe: Hot Keys Of Menu In A Dialog Box Pin
Ahmad9927-Sep-01 3:29
Ahmad9927-Sep-01 3:29 
GeneralRe: Hot Keys Of Menu In A Dialog Box Pin
Ahmad9927-Sep-01 3:29
Ahmad9927-Sep-01 3:29 
GeneralThanks Pin
Ahmad9927-Sep-01 4:27
Ahmad9927-Sep-01 4:27 
GeneralContent of Stl-Container in Debug-Mode Pin
Olivier Heidemann27-Sep-01 2:35
Olivier Heidemann27-Sep-01 2:35 

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.