|
-
April 14th, 2009, 09:36 AM
#28
Re: How to call OnFileNew() from a dialog box in MFC VC++?
 Originally Posted by ADSOFT
GCDEF
I agree that having a global pointer to a view class is not going to work in MDI case, it does cut down a lot of work in SDI's which is what I mostly work on.
Having a function to return a pointer in every dialog box that returns a pointer to it's view class is too much overhead.
Creating a member variable in each Dialog that points to it's base View might work better.
I didn't say put a function in every dialog, I said, or meant, set up a global function that uses the framework to get the view pointer, returning the type that's appropriate for your app. Done properly, it will work for SDI or MDI.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|