Prompt "New file" procedure
Hi,
I currently have a program where, by either pressing Ctrl+N or by going to "File->New" in the menu a new file is prompted.
However, there are cases in my program where I would also like the "new file" protocol to be called when a user presses a button.
Is there some way of accomplishing this, or can the "new file" protocol only be called by the standard Ctrl+N or "File->New" calls?
Thank you in advance.
Re: Prompt "New file" procedure
Code:
AfxGetMainWnd()->SendMessage(WM_COMMAND, ID_FILE_NEW);
More info in TN022: Standard Commands Implementation
Re: Prompt "New file" procedure
Re: Prompt "New file" procedure
Quote:
Originally Posted by
VictorN
Wauw, thank you!
I was not aware it was possible to do that.
That's really great!
Re: Prompt "New file" procedure