Q: Getting pointer to CMainFrame from document? 
Author Message
 Q: Getting pointer to CMainFrame from document?

AfxGetMainWnd doesn't work.  See my previous post titled
"AfxGetMainWnd returns CSplashWnd not CMainFrame during app startup"

TIA - Best regards, Lee Gillie
--
+--------------------------------------------------------------------+

[ Remove "NoSpam" from the reply E-Mail address.                     ]
+--------------------------------------------------------------------+



Wed, 02 Aug 2000 03:00:00 GMT  
 Q: Getting pointer to CMainFrame from document?


Fri, 19 Jun 1992 00:00:00 GMT  
 Q: Getting pointer to CMainFrame from document?

Quote:
> AfxGetMainWnd doesn't work.  See my previous post titled
> "AfxGetMainWnd returns CSplashWnd not CMainFrame during app startup"

> TIA - Best regards, Lee Gillie

Sounds like the MainFrame Window is not yet created. The document is
created before the Frame (it's an SDI, right?) So you have to do whatever
you do later.

cU
--

                        http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retriever 1.0 is out:   http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Wed, 02 Aug 2000 03:00:00 GMT  
 Q: Getting pointer to CMainFrame from document?

That has to do with how the spash screen is implemented; it's not a problem
with AfxGetMainWnd itself. It ALWAYS returns the main window, it's just that
the spash screen makes itself the main window temporarily. I bet if you
examined the splash screen implementation (which isn't really complicated),
you'd find a suitable work-around for your app.

Quote:

>AfxGetMainWnd doesn't work.  See my previous post titled
>"AfxGetMainWnd returns CSplashWnd not CMainFrame during app startup"

>TIA - Best regards, Lee Gillie
>--
>+--------------------------------------------------------------------+

>[ Remove "NoSpam" from the reply E-Mail address.                     ]
>+--------------------------------------------------------------------+



Thu, 03 Aug 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting pointer to CMainFrame

2. Getting pointer to CMainFrame with AfxGetMainWnd not working ?

3. Getting the CMainFrame Pointer

4. Trouble getting a pointer to the document

5. Problem getting document pointer

6. Getting pointers to views from document

7. REPOST: Getting a document pointer in a dialog class

8. Getting a pointer to the currect document.

9. Getting the pointer to my document class

10. SDI - Get Document or View from CMainFrame Object

11. SDI - Get Document or View from CMainFrame Object

12. Getting the CDC in the CMainFrame

 

 
Powered by phpBB® Forum Software