Solved

Accessing Main Frame

Posted on 2003-11-03
2
136 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
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
iSeries FTP Exit Program 8 135
while loop over for loop 7 102
Capture logon name 13 73
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 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