Re: Creating a new document
A Quick and dirty way is to set a flag someplace, store the data someplace, and trigger OnFileNew(). When the new view constructs, have it check the flag, and if the flag is set, have it get the stored data, use it, and then unset the flag.
-=- James.
Re: Creating a new document
1.Send WM_COMMAND (ID_FILE_NEW)to MDIFrameWnd.
2. Send WM_COPYDATA with string to MDIFrameWnd.
3.In MDIFrameWnd repost this message to all ChildFrames.
4.In the Doc class I suppose you have to have CString member to hold string from dialog,which should be empty.
5.In Your ChildFrame class enter handle for WM_COPYDATA,which should test if the relevant Doc class has empty string member - and if it has - set it to new (received with message).
6.View will output the string from relevant Doc,in usual way(using TextOut for instance).
Good luck,
Oleg.