Click here to Skip to main content
16,004,901 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: i don't know about the Control Variable Pin
Nitron3-Jan-03 5:22
Nitron3-Jan-03 5:22 
QuestionCan Get Overide Files Name When Use SHFileOperation? Pin
zjkw3-Jan-03 0:25
zjkw3-Jan-03 0:25 
AnswerRe: Can Get Overide Files Name When Use SHFileOperation? Pin
zjkw4-Jan-03 17:52
zjkw4-Jan-03 17:52 
General_setmode: Win CE Tools vs. V Studio 6(help!) Pin
sparky012-Jan-03 22:55
sparky012-Jan-03 22:55 
GeneralRe: _setmode: Win CE Tools vs. V Studio 6(help!) Pin
Anonymous2-Jan-03 23:31
Anonymous2-Jan-03 23:31 
GeneralRe: _setmode: Win CE Tools vs. V Studio 6(help!) Pin
sparky012-Jan-03 23:40
sparky012-Jan-03 23:40 
GeneralRe: _setmode: Win CE Tools vs. V Studio 6(help!) Pin
sparky013-Jan-03 0:02
sparky013-Jan-03 0:02 
GeneralGetting correct ChildFrame ptr in xxxDoc Pin
EiSl2-Jan-03 22:22
EiSl2-Jan-03 22:22 
Hello all,

I really have the feeling that this is a stupid question, but for some reason I do not see the answer Blush | :O

Problem (Multi Doc Interface project):
When creating a new document (OnNewDocument), I also need to have access to its ChildFrame object to set some data member (via public method). I used next code, but its unfortunaltely faulty.
<br />
BOOL MyAppDoc::OnNewDocument()<br />
{<br />
  if (!CDocument::OnNewDocument())<br />
     return FALSE;<br />
  ...<br />
  CMainFrame *pMainFrame = ( CMainFrame* )AfxGetMainWnd(); <br />
  ASSERT( pMainFrame ); <br />
  CChildFrame *pChild = (CChildFrame *) pMainFrame->GetActiveFrame();<br />
<br />
  // Now using pChild to access a public methode which sets a datamember-> crash<br />
  ...<br />
}


Where I'm going the wrong way?

More background info:
In my ChildFrame (not MainFrame) I've defined a statusbar, which should be updated with info I've available at the moment of creation doc (or view).

Thanks in advance,
EiSl
GeneralRe: Getting correct ChildFrame ptr in xxxDoc Pin
Alois Kraus2-Jan-03 23:06
Alois Kraus2-Jan-03 23:06 
GeneralRe: Getting correct ChildFrame ptr in xxxDoc Pin
EiSl3-Jan-03 0:02
EiSl3-Jan-03 0:02 
GeneralRe: Getting correct ChildFrame ptr in xxxDoc Pin
Alois Kraus3-Jan-03 1:34
Alois Kraus3-Jan-03 1:34 
GeneralCFiledialog Customization Pin
sbabu2-Jan-03 22:21
sbabu2-Jan-03 22:21 
GeneralRe: CFiledialog Customization Pin
xxhimanshu2-Jan-03 22:33
xxhimanshu2-Jan-03 22:33 
GeneralError handling Pin
suresh_sathya2-Jan-03 22:17
suresh_sathya2-Jan-03 22:17 
GeneralRe: Error handling Pin
r i s h a b h s3-Jan-03 2:02
r i s h a b h s3-Jan-03 2:02 
GeneralGetQueueStatus() and WM_LBUTTONDOWN... Pin
Neha2-Jan-03 22:14
Neha2-Jan-03 22:14 
GeneralRe: GetQueueStatus() and WM_LBUTTONDOWN... Pin
Michael Dunn3-Jan-03 16:44
sitebuilderMichael Dunn3-Jan-03 16:44 
GeneralUML Question Pin
Phil Speller2-Jan-03 21:55
Phil Speller2-Jan-03 21:55 
GeneralRe: UML Question Pin
Zdenek Navratil2-Jan-03 22:21
Zdenek Navratil2-Jan-03 22:21 
GeneralRe: UML Question Pin
Phil Speller2-Jan-03 23:10
Phil Speller2-Jan-03 23:10 
Generalfull screen size dialog Pin
Didaa2-Jan-03 21:46
Didaa2-Jan-03 21:46 
GeneralRe: full screen size dialog Pin
ashxly2-Jan-03 22:01
ashxly2-Jan-03 22:01 
GeneralRe: full screen size dialog Pin
xxhimanshu2-Jan-03 22:05
xxhimanshu2-Jan-03 22:05 
GeneralRe: full screen size dialog Pin
Zdenek Navratil2-Jan-03 22:47
Zdenek Navratil2-Jan-03 22:47 
GeneralRe: full screen size dialog Pin
Joan M2-Jan-03 22:54
professionalJoan M2-Jan-03 22:54 

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.