####################################
Code:
void CNoNameApp::OnNewForceModel()
{
CForceModel_Doc* fModelDoc;
fModelDoc = (CForceModel_Doc*) pDocTemplateForceModel-
>CreateNewDocument();
CString title = "Force Model";
fModelDoc->setTitle(title);
// Create FormView
CDiagramFormFrameChild* pFormView = (CDiagramFormFrameChild*)
pDocTemplateForceModel->CreateNewFrame(fModelDoc, NULL);
pDocTemplateForceModel->InitialUpdateFrame(pFormView,fModelDoc,TRUE);
}
#########################
the doctemplate is implemented in the app
Code:
##########################
pDocTemplateForceModel = new CMultiDocTemplate(IDR_MAINFRAME,
RUNTIME_CLASS(CForceModel_Doc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CForceModel_View));
if (!pDocTemplateForceModel)
return FALSE;
AddDocTemplate(pDocTemplateForceModel);
##########################
I end up with an unhandled exception within the CreateNewFrame
function.
The doc template can't create a frame
Does someone have an idea why this is not working this time... and for
all my other views it's working fine?
thanks BaeMan
Also, since pDocTemplateForceModel is a class member, I would use
m_pDocTemplateForceModel as the name so that you can differentiate
between class members and local variables.
--
Ajay
"Unhandled Exception from CreateNewFrame"
--
swapn...@gmail.com
------------------------------------------------------------------------
swapn...@gmail.com's Profile: http://microsoft-news.for-um.de/member.php?userid=10031
View this thread: http://microsoft-news.for-um.de/showthread.php?t=34049
Powered by: http://poker-and-gambling-news.for-um.de/ | http://microsoft-news.for-um.de | http://ibm-news.for-um.de | http://www.for-um.de | http://www.uzenet.org
On Wed, 29 Dec 2010 12:10:41 +0100, nor...@hotmail.com wrote:
>
>Dear techies,
>Have anyone faced similar issue n solved this.
>
>"Unhandled Exception from CreateNewFrame"
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm