JaredBobby,
Quote:
>First Question:
> How do I get around using the default dialog that MFC puts up for
>selecting which template to use?
Each document template has a set of resources associated with it, the first
parameter to the constructor. One of these resources is a string table
entry. You can look at the help for GetDocString to see the breakout of this
string. The third substring of this string is called the fileNewName. If
this substring is null then this document template will not show up in the
file new dialog. Therefore, if only one of your document template strings
has a fileNewName, then it becomes the "default" template for file new and
you never see the file new dialog.
Quote:
>Second Question:
> In the future, there will be several (about 10) document templates.
>Some of these templates should not have more than one view open at a time.
>Since I've had trouble doing this using a SingleDocTemplate for those
views,
>I've had to use a MultiDocTemplate for them. Is there a way to check to
see
>if there is already a view of this document template open and if there is,
>cancel the operation? Also, it gets trickier. One view can have a view
>open only a certain number of times--based on the user's data (kinda like a
>view for each customer in a database, but no customer can have more than
one
>view open at a time).
Since OnFileNew (after the change above) will only open one type of view,
you will need to add your own method to open these other views. There are
methods of the frame window class to walk the list of open child frames. You
will have to do this and count the number of times the desired view is open.
Then respond accordingly.
Dave Smith