Solved

Accessing Main Frame

Posted on 2003-11-03
2
138 Views
Last Modified: 2013-11-20
In my program...user preferences are loaded at start up. They are stored in the CApp part of my program because it is an MDI and that seems to make the most sense. Now...when the user opens a document...I want the program to check to see if preferences have been created...and if not...to launch the proper dialog for the user automatically. The normal way this is achieved is when the user clicks on a menu item under File called Options, the dialog opens. The handler for that menu item is in the main frame.

 From the document...how can I programatically get the MainFrames OnFileOptions() function to call so that the dialog automatically comes up for the user is preferences have not been set.
0
Comment
Question by:SGyves
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 16

Expert Comment

by:_nn_
ID: 9674724
Maybe this would be enough :

AfxGetMainWnd->PostMessage(WM_COMMAND, ID_FILE_OPTIONS);

0
 
LVL 16

Accepted Solution

by:
_nn_ earned 350 total points
ID: 9674730
Ahem, sorry.

AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_FILE_OPTIONS);

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 109
Get filename and folder into excel 7 87
ASCII Non-Printable characters/codes and their HTML equivalents 6 158
Not needed 13 133
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question