Click here to Skip to main content
15,902,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to schedule a a thread to a specific CPU? Pin
Anonymous5-Sep-03 13:15
Anonymous5-Sep-03 13:15 
GeneralNeed for derived class to show base clase object. Pin
WREY4-Sep-03 12:29
WREY4-Sep-03 12:29 
Generalbad design Pin
dog_spawn4-Sep-03 12:46
dog_spawn4-Sep-03 12:46 
GeneralTalk is cheap!! Show me the money!! Pin
WREY4-Sep-03 14:29
WREY4-Sep-03 14:29 
GeneralEr Pin
dog_spawn4-Sep-03 16:36
dog_spawn4-Sep-03 16:36 
GeneralRe: Need for derived class to show base clase object. Pin
Alvaro Mendez4-Sep-03 17:28
Alvaro Mendez4-Sep-03 17:28 
GeneralRe: Need for derived class to show base clase object. Pin
WREY4-Sep-03 21:17
WREY4-Sep-03 21:17 
GeneralRe: Need for derived class to show base clase object. Pin
Jason Henderson4-Sep-03 18:24
Jason Henderson4-Sep-03 18:24 
I'll bite...

This may not be the solution you need, but you could make the ShowExpandedInfo() method virtual and in the derived class you could call A::ShowExpandedInfo(). The bad thing is, it would probably show A and B.

A better solution might be to get a B pointer instead and cast it however you want it to be used. Like this:

A* ptrA = NULL;
B* ptrB = new B;

ptrA = (A*)B;

ptrA->RunOuterLoop();  // should get A and not B
ptrB->RunOuterLoop();  // use this to get B


You can pass ptrA around and cast it back to a B* since that's what it really is. I've got some code at work doing this sort of thing so if my memory of this is wrong I can look it up tomorrow.

"It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln
Jason Henderson
blog | articles

GeneralRe: Need for derived class to show base clase object. Pin
WREY4-Sep-03 22:25
WREY4-Sep-03 22:25 
GeneralSetting intermediate files path to a global folder using an environment variable Pin
Jean-Marc Molina4-Sep-03 12:08
Jean-Marc Molina4-Sep-03 12:08 
QuestionHow to open a folder using MFC Pin
nachilau4-Sep-03 10:57
nachilau4-Sep-03 10:57 
AnswerRe: How to open a folder using MFC Pin
Ravi Bhavnani4-Sep-03 11:13
professionalRavi Bhavnani4-Sep-03 11:13 
GeneralRe: How to open a folder using MFC Pin
nachilau4-Sep-03 12:01
nachilau4-Sep-03 12:01 
GeneralRe: How to open a folder using MFC Pin
Rickard Andersson204-Sep-03 12:09
Rickard Andersson204-Sep-03 12:09 
GeneralRe: How to open a folder using MFC Pin
Ravi Bhavnani4-Sep-03 12:43
professionalRavi Bhavnani4-Sep-03 12:43 
GeneralScreen Coordinates/Front-Back Pin
DougW484-Sep-03 9:22
DougW484-Sep-03 9:22 
GeneralRe: Screen Coordinates/Front-Back Pin
PJ Arends4-Sep-03 10:01
professionalPJ Arends4-Sep-03 10:01 
GeneralRe: Screen Coordinates/Front-Back Pin
dog_spawn4-Sep-03 12:47
dog_spawn4-Sep-03 12:47 
GeneralAntivirus Pin
Anonymous4-Sep-03 9:22
Anonymous4-Sep-03 9:22 
GeneralRe: Antivirus Pin
David Crow4-Sep-03 9:32
David Crow4-Sep-03 9:32 
GeneralRe: Antivirus Pin
dog_spawn4-Sep-03 12:51
dog_spawn4-Sep-03 12:51 
Questionhow to access the view from the doc? Pin
Binayak4-Sep-03 9:18
Binayak4-Sep-03 9:18 
AnswerRe: how to access the view from the doc? Pin
Larry J. Siddens4-Sep-03 9:28
Larry J. Siddens4-Sep-03 9:28 
AnswerRe: how to access the view from the doc? Pin
David Crow4-Sep-03 9:38
David Crow4-Sep-03 9:38 
GeneralRe: how to access the view from the doc? Pin
Binayak4-Sep-03 9:55
Binayak4-Sep-03 9:55 

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.