AddDocTemplate outside of CWinApp::InitInstance
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
Re: AddDocTemplate outside of CWinApp::InitInstance
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