Click here to Skip to main content
15,915,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tree Control and CDocument Pin
Neville Franks16-Nov-02 8:57
Neville Franks16-Nov-02 8:57 
GeneralRe: Tree Control and CDocument Pin
Azadeh16-Nov-02 18:39
Azadeh16-Nov-02 18:39 
GeneralRe: Tree Control and CDocument Pin
Neville Franks16-Nov-02 20:54
Neville Franks16-Nov-02 20:54 
GeneralRe: Tree Control and CDocument Pin
Azadeh18-Nov-02 8:04
Azadeh18-Nov-02 8:04 
GeneralRe: Tree Control and CDocument Pin
Neville Franks18-Nov-02 8:34
Neville Franks18-Nov-02 8:34 
GeneralRe: Tree Control and CDocument Pin
Azadeh18-Nov-02 21:30
Azadeh18-Nov-02 21:30 
GeneralRe: Tree Control and CDocument Pin
Neville Franks19-Nov-02 0:03
Neville Franks19-Nov-02 0:03 
GeneralRe: Tree Control and CDocument Pin
Azadeh28-Nov-02 7:18
Azadeh28-Nov-02 7:18 
Thank you and my problem is solved by adding the following lines to my code which I found in MSDN:

CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
// Get the active MDI child window.
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();

// or CMDIChildWnd *pChild = pFrame->MDIGetActive();

// Get the active view attached to the active MDI child
// window.
CMyDoc *pDoc = (CMyDoc *) pChild->GetActiveDocument();

You're right,using C style casts isn't good ,but I don't know exactly where I can use dynamic_cast and static_cast

operators.Once I wanted to type cast a pointer to a base class to a pointer to one of its derived class with these

operators but I wan't successful.
Base b; // suppose base class has a pointer to Base named link
Derived* d;
b.link=new Derived;
First of all ,can I use b.link as a pointer to Derived and use fields of Derived?



GeneralProblem in TabControl Pin
Nirav Doshi16-Nov-02 4:15
Nirav Doshi16-Nov-02 4:15 
GeneralRe: Problem in TabControl Pin
NormDroid16-Nov-02 7:12
professionalNormDroid16-Nov-02 7:12 
GeneralRe: Problem in TabControl Pin
Nirav Doshi16-Nov-02 7:40
Nirav Doshi16-Nov-02 7:40 
GeneralRe: Problem in TabControl Pin
Joan M17-Nov-02 8:13
professionalJoan M17-Nov-02 8:13 
QuestionIs there something wrong with my DirectX SDK? Pin
Redeemer-dk16-Nov-02 3:53
Redeemer-dk16-Nov-02 3:53 
Generalcreating help files Pin
jack lowe16-Nov-02 3:11
sussjack lowe16-Nov-02 3:11 
GeneralRe: creating help files Pin
Paul M Watt16-Nov-02 7:49
mentorPaul M Watt16-Nov-02 7:49 
Questionhow to work with sln and vcproj files Pin
Anonymous16-Nov-02 3:03
Anonymous16-Nov-02 3:03 
AnswerRe: how to work with sln and vcproj files Pin
lbc16-Nov-02 4:08
lbc16-Nov-02 4:08 
AnswerRe: how to work with sln and vcproj files Pin
Chris Richardson16-Nov-02 11:35
Chris Richardson16-Nov-02 11:35 
GeneralRe: how to work with sln and vcproj files Pin
Stephane Rodriguez.16-Nov-02 20:00
Stephane Rodriguez.16-Nov-02 20:00 
GeneralRe: how to work with sln and vcproj files Pin
Chris Richardson18-Nov-02 7:00
Chris Richardson18-Nov-02 7:00 
Generalportability 2 Pin
Ian Dermott16-Nov-02 2:58
sussIan Dermott16-Nov-02 2:58 
GeneralRe: portability 2 Pin
ian mariano16-Nov-02 9:03
ian mariano16-Nov-02 9:03 
GeneralRe: portability 2 Pin
ian mariano16-Nov-02 9:10
ian mariano16-Nov-02 9:10 
GeneralIIS: a theoretical question - processes and threads Pin
devvvy16-Nov-02 2:48
devvvy16-Nov-02 2:48 
GeneralRe: IIS: a theoretical question - processes and threads Pin
ian mariano16-Nov-02 8:42
ian mariano16-Nov-02 8:42 

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.