If it were me I'd just write to the proper place. Especially if I didn't
documents at run time).
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
Of course, there is a simpler answer: if you don't have one, create one!
CSingleDocTemplate templ = new CSingleDocTemplate(
IDR_WHATEVER,
RUNTIME_CLASS(CSomeView),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CSomeDocument));
templ->RegisterShellFileTypes();
delete templ;
So you create a dummy view, frame, and document which you can copy from a
simple dummy app
"Some" that you create. Since you will never instantiate these classes,
they are harmless
(and don't whine about "They take up code space" since code space is
utterly and
completely irrelevant to Windows application programming). Create a
dummy app, do a
little creative copy-and-paste (don't forget the IDR_WHATEVER string and
icon!) and you're
done.
joe
On Mon, 27 Oct 2008 16:21:37 -0600, "Jonathan Wood"
<jwood@softcircuits.com> wrote:
No, because it requires a document template, which requires a CDocument
class, which my dialog-based application doesn't have.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
news:1af5bb74-a7cd-424b-9bd0-f2672a1d96ac@t54g2000hsg.googlegroups.com...
On Oct 25, 3:35 pm, "Jonathan Wood" <jw...@softcircuits.com> wrote:
Has anyone seen any info on how to associated a file type with my
dialog-based application?
In order to use RegisterShellFileTypes(), I must add my document
template
using AddDocTemplates(). But AddDocTemplates() can't be called without
a
CDocument class.
Thanks for any thoughts.
--
Jonathan Wood
SoftCircuits Programminghttp://www.softcircuits.com
I dont have a good answer but cant you just take the code from source
that does the registration and use it in your app?
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm