Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Accessing Main Frame

Posted on 2003-11-03
2
Medium Priority
?
141 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 1400 total points
ID: 9674730
Ahem, sorry.

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

0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

618 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