Click to See Complete Forum and Search --> : AddDocTemplate outside of CWinApp::InitInstance


Mike Williams
March 31st, 1999, 08:03 PM
Hi all,


I am writing an app where need to be able to add multiple document templates

outside of CWinApp::InitInstance(), it is for an MDI application. Does anybody have any idea of whether the framework is supports calling AddDocTemplate outside of CWinApp::InitInstance()? It is a single threaded application.


Thanks in Advance,

Mike

Dave Lorde
April 1st, 1999, 05:40 AM
You can do this anywhere, but you should add all document templates to an application before you call RegisterShellFileTypes if you want them to allow the user to open a data file created by your application by double-clicking it from within File Manager.


I think it's OK if you call RegisterShellFileTypes more than once (don't forget to also call the EnableShellOpen member function when you call RegisterShellFileTypes).


Dave