Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDestroying ModalDialog Pin
pix_programmer4-May-11 4:46
pix_programmer4-May-11 4:46 
AnswerRe: Destroying ModalDialog Pin
David Crow4-May-11 4:57
David Crow4-May-11 4:57 
AnswerRe: Destroying ModalDialog Pin
Albert Holguin4-May-11 5:14
professionalAlbert Holguin4-May-11 5:14 
AnswerRe: Destroying ModalDialog Pin
basementman4-May-11 5:59
basementman4-May-11 5:59 
Questionupcast Pin
Smith#4-May-11 4:25
Smith#4-May-11 4:25 
GeneralRe: upcast Pin
David Crow4-May-11 5:07
David Crow4-May-11 5:07 
GeneralRe: upcast Pin
Albert Holguin4-May-11 5:15
professionalAlbert Holguin4-May-11 5:15 
AnswerRe: upcast Pin
Albert Holguin4-May-11 5:19
professionalAlbert Holguin4-May-11 5:19 
David is correct, that's the way to do it, if you don't like his options, then you probably shouldn't have made it virtual, if its not virtual, then the call gets evaluated at runtime according to the pointer.

if not virtual...
CBase* cp = new CDerived();
cp->testApp();               //calls base testApp() because pointer is of type CBase
((CDerived *)cp)->testApp(); //calls derived testApp() because pointer is of type CDerived


..you just have to know exactly what it is you want.
GeneralRe: upcast Pin
Smith#4-May-11 5:30
Smith#4-May-11 5:30 
GeneralRe: upcast Pin
Albert Holguin4-May-11 5:34
professionalAlbert Holguin4-May-11 5:34 
GeneralRe: upcast Pin
Albert Holguin4-May-11 5:37
professionalAlbert Holguin4-May-11 5:37 
GeneralRe: upcast Pin
Stefan_Lang4-May-11 6:26
Stefan_Lang4-May-11 6:26 
AnswerRe: upcast Pin
Stefan_Lang4-May-11 5:29
Stefan_Lang4-May-11 5:29 
GeneralRe: upcast Pin
Smith#4-May-11 6:03
Smith#4-May-11 6:03 
GeneralRe: upcast Pin
Albert Holguin4-May-11 7:15
professionalAlbert Holguin4-May-11 7:15 
QuestionDebug OK, Release wrong after run 59times Pin
bopi4-May-11 4:17
bopi4-May-11 4:17 
QuestionRe: Debug OK, Release wrong after run 59times Pin
David Crow4-May-11 5:12
David Crow4-May-11 5:12 
GeneralRe: Debug OK, Release wrong after run 59times Pin
Albert Holguin4-May-11 5:22
professionalAlbert Holguin4-May-11 5:22 
AnswerRe: Debug OK, Release wrong after run 59times Pin
Stefan_Lang4-May-11 5:40
Stefan_Lang4-May-11 5:40 
QuestionWhy Enter key in Editbox count as 2 Character? Pin
Le@rner4-May-11 2:07
Le@rner4-May-11 2:07 
AnswerRe: Why Enter key in Editbox count as 2 Character? Pin
Niklas L4-May-11 2:11
Niklas L4-May-11 2:11 
GeneralRe: Why Enter key in Editbox count as 2 Character? Pin
Le@rner4-May-11 2:13
Le@rner4-May-11 2:13 
GeneralRe: Why Enter key in Editbox count as 2 Character? Pin
Niklas L4-May-11 2:17
Niklas L4-May-11 2:17 
GeneralRe: Why Enter key in Editbox count as 2 Character? Pin
Le@rner4-May-11 2:26
Le@rner4-May-11 2:26 
GeneralRe: Why Enter key in Editbox count as 2 Character? Pin
Niklas L4-May-11 2:30
Niklas L4-May-11 2:30 

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.