Click here to Skip to main content
16,011,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Getting correct ChildFrame ptr in xxxDoc Pin
Alois Kraus2-Jan-03 23:06
Alois Kraus2-Jan-03 23:06 
Perhaps You forgot to call the base class:

BOOL CMyDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;

// Do initialization of new document here.

return TRUE;
}

The MSDN says that this is called as a part during the File New Command.
You can't be sure that the window already has been completely created.

I did always keep a list of doc/view ptr in min App Object. It worked very well.
<br />
class CMyApp<br />
{<br />
<br />
<br />
public:<br />
      vector<CView *>     m_ActiveViews;<br />
      vector<CDocument *> m_ActiveDocs;<br />
}<br />
<br />
I always filled both in the members in <br />
<br />
void CMyView::OnInitialUpdate( )<br />
{<br />
    CView::OnOnInitialUpdate();<br />
<br />
    CMyApp *pMyApp = (CMyApp *) AfxGetApp();<br />
    if( pMyApp )<br />
    {<br />
        pMyApp->m_ActiveViews.push_back(this);<br />
        pMyApp->m_ActiveDocs.push_back(GetDocument());<br />
    }<br />
}<br />


where i could be sure that the window was created and the document ptr
already existing. This would be a better place to change the frame window.
Keep Your list up to date and all will work fine.
<br />
CFrameWnd::InitialUpdateFrame( CDocument* pDoc, BOOL bMakeVisible );<br />


would be the best place to change the frame window behaviour
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 
GeneralRe: full screen size dialog Pin
Didaa2-Jan-03 23:16
Didaa2-Jan-03 23: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.