Click here to Skip to main content
15,894,017 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to lauch threads really simultaneously? Pin
Michael Dunn15-Oct-06 9:05
sitebuilderMichael Dunn15-Oct-06 9:05 
GeneralRe: How to lauch threads really simultaneously? Pin
bouli15-Oct-06 20:39
bouli15-Oct-06 20:39 
GeneralRe: How to lauch threads really simultaneously? Pin
Mark Salsbery16-Oct-06 7:17
Mark Salsbery16-Oct-06 7:17 
QuestionMultiple instance of com object Pin
ayol1212215-Oct-06 8:24
ayol1212215-Oct-06 8:24 
AnswerRe: Multiple instance of com object Pin
tanvon malik15-Oct-06 14:39
tanvon malik15-Oct-06 14:39 
GeneralRe: Multiple instance of com object Pin
ayol1212216-Oct-06 6:56
ayol1212216-Oct-06 6:56 
QuestionPolymorphic classes Pin
Waldermort15-Oct-06 6:31
Waldermort15-Oct-06 6:31 
AnswerRe: Polymorphic classes Pin
Gary R. Wheeler15-Oct-06 6:44
Gary R. Wheeler15-Oct-06 6:44 
As a rule, the code in SomeFunction shouldn't care what type of derived class is passed to it. If you need specialized behavior in SomeFunction, add a virtual function to the Base class that can be overridden in the derived classes:
class Base
{
public:
  virtual void Behavior();
};
class derA : public Base
{
public:
  virtual void Behavior();
};
class derB : public Base
{
};
void SomeFunction( Base* base ){
   base->Behavior();
}
//
derA A;
derB B;
SomeFunction(&A); // calls derA::Behavior();
SomeFunction(&B); // calls Base::Behavior(), 
                  // since derB doesn't implement it




Software Zen: delete this;

GeneralRe: Polymorphic classes Pin
Waldermort15-Oct-06 14:21
Waldermort15-Oct-06 14:21 
AnswerRe: Polymorphic classes Pin
Jörgen Sigvardsson15-Oct-06 8:45
Jörgen Sigvardsson15-Oct-06 8:45 
QuestionMFC ActiveX built with /CLR fails to load Pin
DnKostya15-Oct-06 5:50
DnKostya15-Oct-06 5:50 
AnswerRe: MFC ActiveX built with /CLR fails to load Pin
sps-itsec4615-Dec-06 2:05
sps-itsec4615-Dec-06 2:05 
QuestionHow to Separate Interface and concrete class to 2 DLLs in C++ Pin
Julia115-Oct-06 4:02
Julia115-Oct-06 4:02 
AnswerRe: How to Separate Interface and concrete class to 2 DLLs in C++ Pin
Gary R. Wheeler15-Oct-06 6:38
Gary R. Wheeler15-Oct-06 6:38 
QuestionRe: How to Separate Interface and concrete class to 2 DLLs in C++ Pin
Julia116-Oct-06 3:19
Julia116-Oct-06 3:19 
AnswerRe: How to Separate Interface and concrete class to 2 DLLs in C++ Pin
Gary R. Wheeler16-Oct-06 13:02
Gary R. Wheeler16-Oct-06 13:02 
QuestionHow do you use combo boxes with a Doc View SDI Application Pin
D_code_writer15-Oct-06 3:10
D_code_writer15-Oct-06 3:10 
AnswerRe: How do you use combo boxes with a Doc View SDI Application Pin
cje16-Oct-06 4:37
cje16-Oct-06 4:37 
AnswerRe: How do you use combo boxes with a Doc View SDI Application Pin
Mark Salsbery16-Oct-06 7:32
Mark Salsbery16-Oct-06 7:32 
AnswerRe: How do you use combo boxes with a Doc View SDI Application Pin
D_code_writer16-Oct-06 21:54
D_code_writer16-Oct-06 21:54 
GeneralRe: How do you use combo boxes with a Doc View SDI Application Pin
Mark Salsbery17-Oct-06 6:13
Mark Salsbery17-Oct-06 6:13 
QuestionHow to use "Connection: Keep-Alive" header Pin
zzattack15-Oct-06 2:12
zzattack15-Oct-06 2:12 
AnswerRe: How to use "Connection: Keep-Alive" header Pin
Michael Dunn15-Oct-06 9:03
sitebuilderMichael Dunn15-Oct-06 9:03 
GeneralRe: How to use "Connection: Keep-Alive" header Pin
zzattack15-Oct-06 9:59
zzattack15-Oct-06 9:59 
QuestionHow to set the cursor on an EditBox? Pin
sir_moreno15-Oct-06 1:16
sir_moreno15-Oct-06 1:16 

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.