Solved

New File Message

Posted on 2009-07-14
3
183 Views
Last Modified: 2013-11-20
Hiya

How can I post a message in mfc to fire the NewFile event?

John
0
Comment
Question by:IssacJones
  • 2
3 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 24849088
Is this what you want?
AfxGetMainWnd()->PostMessage(ID_FILE_NEW, 0, 0L);
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 250 total points
ID: 24849151
I suspect you might want this
    AfxGetMainWnd()->PostMessage(WM_COMMAND, MAKEWPARAM(ID_FILE_NEW, 0), NULL);


0
 

Author Closing Comment

by:IssacJones
ID: 31603232
Thanks Andy, Excellent!!!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

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. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

773 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