CDocument: load xml and dlls
- From: mfc <mfcprog@xxxxxxxxxxxxxx>
- Date: Mon, 13 Sep 2010 04:25:18 -0700 (PDT)
Hi,
in the cdocument-class of my sdi-application, I load a xml file (in
the CMIAppDoc::OnNewDocument() method) where all user-specific-data
are located. I`ve also installed a few satellite dllls to support
several languages.
BOOL CMIAppDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
//load xml file
if(XmlFile.LoadUserXml(strFileName))
{
}
}
Among other things the xml file has the information which satellite
dll should be loaded at startup.
I take a look at some multiple language projects, where the satellite
dll is always loaded in the cmainframe class. Unfortunately, after the
OnNewDocument() method, there`s no window available, so that it seems
to me impossible to call the mainframe class from the document class
(at this point OnNewDocument()). All other information in the xml file
are related to the view-class.
Which would be the recommended place (class) to load the xml file as
well as to load the dll file? So that the view-class will get all
necessary information from the xml file as well as the correct dll
will be loaded..
At the moment it seems to me that the OnNewDocument() method would be
the best place to load both files. And by the invisible window
(installed for the cdocument class) I`m able to send/receive messages
getting information from the xml file as well as loading a new dll
during the running application...
best regards
Hans
.
- Follow-Ups:
- Re: CDocument: load xml and dlls
- From: Goran Pusic
- Re: CDocument: load xml and dlls
- Prev by Date: Re: MFC stream classes
- Next by Date: Re: CDocument: load xml and dlls
- Previous by thread: MCI_OPEN and memory based data
- Next by thread: Re: CDocument: load xml and dlls
- Index(es):
Relevant Pages
|