Click here to Skip to main content
15,924,317 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SetFocus Problem Pin
Bartosz Bien18-Apr-03 3:11
Bartosz Bien18-Apr-03 3:11 
GeneralMove modeless dialog over a control Pin
Cedric Moonen18-Apr-03 2:24
Cedric Moonen18-Apr-03 2:24 
GeneralOk solved ! :) Pin
Cedric Moonen18-Apr-03 2:29
Cedric Moonen18-Apr-03 2:29 
QuestionAre there some reference about how to use auto_ptr? Pin
George218-Apr-03 2:07
George218-Apr-03 2:07 
AnswerRe: Are there some reference about how to use auto_ptr? Pin
Xander8018-Apr-03 2:14
Xander8018-Apr-03 2:14 
GeneralRe: Are there some reference about how to use auto_ptr? Pin
George218-Apr-03 2:38
George218-Apr-03 2:38 
QuestionWhat means "smart pointer"? Pin
George218-Apr-03 1:28
George218-Apr-03 1:28 
AnswerRe: What means "smart pointer"? Pin
Zdeslav Vojkovic18-Apr-03 1:43
Zdeslav Vojkovic18-Apr-03 1:43 
smart pointer is a class that wraps a pointer and overloads operator -> , to enable clients to use the smart pointer with same syntax as regular pointer. the class takes care of lifetime of the wrapped object (e.g. reference counting for COM objects, or deallocation for regular pointers).
Example:
void fn()
{
   std::auto_ptr<CMyClass> pMyClass = new CMyClass();
   pMyClass->SomeFunction(); // pMyClass is object, not a pointer, but -> operator is used
}  // no need to call delete, auto_ptr takes care of it


some examples:
std::auto_ptr<> - check MSDN library
_com_ptr_t<> - wraps COM objects, VC++ compiler supported (check MSDN library)
CComPtr<> - wraps COM objects, provided by MFC (check MSDN library)

also, check Boost[^] for few other implementations
GeneralRe: What means "smart pointer"? Pin
George218-Apr-03 2:04
George218-Apr-03 2:04 
GeneralProblem in Desk Band Pin
Pious18-Apr-03 0:11
Pious18-Apr-03 0:11 
GeneralDocked toolbar with 2 columns Pin
ABMuppet17-Apr-03 23:20
ABMuppet17-Apr-03 23:20 
General24bit compatibitible Pin
Prog Mmer17-Apr-03 23:16
Prog Mmer17-Apr-03 23:16 
GeneralAutodeleting exe Pin
pjeansqp17-Apr-03 23:16
susspjeansqp17-Apr-03 23:16 
GeneralRe: Autodeleting exe Pin
Dominik Reichl18-Apr-03 3:08
Dominik Reichl18-Apr-03 3:08 
GeneralRe: Autodeleting exe Pin
Navin18-Apr-03 6:30
Navin18-Apr-03 6:30 
General24bit compatibitible Pin
Prog Mmer17-Apr-03 23:16
Prog Mmer17-Apr-03 23:16 
GeneralRe: 24bit compatibitible Pin
PJ Arends18-Apr-03 9:32
professionalPJ Arends18-Apr-03 9:32 
GeneralRe: 24bit compatibitible Pin
Prog Mmer21-Apr-03 17:36
Prog Mmer21-Apr-03 17:36 
GeneralRe: 24bit compatibitible Pin
PJ Arends22-Apr-03 6:37
professionalPJ Arends22-Apr-03 6:37 
GeneralCalling conventions Pin
Cedric Moonen17-Apr-03 23:09
Cedric Moonen17-Apr-03 23:09 
GeneralRe: Calling conventions Pin
Bartosz Bien18-Apr-03 1:30
Bartosz Bien18-Apr-03 1:30 
GeneralWhat's wrong with this codes? But it generates Stack Overflow exception. Pin
DengJW17-Apr-03 20:30
DengJW17-Apr-03 20:30 
GeneralRe: What's wrong with this codes? But it generates Stack Overflow exception. Pin
David Crow18-Apr-03 4:21
David Crow18-Apr-03 4:21 
GeneralRe: What's wrong with this codes? But it generates Stack Overflow exception. Pin
Joe Woodbury18-Apr-03 6:11
professionalJoe Woodbury18-Apr-03 6:11 
GeneralWhat's wrong with this codes? But it generates Stack Overflow exception. Pin
DengJW17-Apr-03 20:25
DengJW17-Apr-03 20:25 

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.