D
Daniel
I have embedded word into our application in vs 2003 and it works fine.
We have now moved up to vs 2005. It all compiles fine but when you run the
application and gets to the point where word is supposed to starts it crash.
It's not able to perform the call to Activate.
....
m_pEditView = (CView*)new CWnd();
m_pEditView->Attach(m_cntrl->hwnd());
TRY
{
m_pDoc = new COleDocument();
m_pItem = new COleDocObjectItem(m_pDoc);
CLSID clsid;
::CLSIDFromProgID(L"Word.Document",&clsid);
// Create the Word embedded item.
m_pItem->CreateNewItem(clsid);
m_pItem->Activate(OLEIVERB_SHOW, m_pEditView);
}
CATCH(CException, e)
....
If I debug, I'll se that the call:
SCODE sc = m_lpObject->DoVerb(nVerb, lpMsg, lpClientSite, -1,
hWnd, lpPosRect);
in:
void COleClientItem::Activate(LONG nVerb, CView* pView, LPMSG lpMsg)
in the file olecli3.cpp fails with a returncode.
I tried to google the return and didn't a single hit.
I have tried to search for information about this and what have changed
between vs 2003 and vs 2005 with no luck.
Anyone got any ideas what the problem might be and what to do about it?
We have now moved up to vs 2005. It all compiles fine but when you run the
application and gets to the point where word is supposed to starts it crash.
It's not able to perform the call to Activate.
....
m_pEditView = (CView*)new CWnd();
m_pEditView->Attach(m_cntrl->hwnd());
TRY
{
m_pDoc = new COleDocument();
m_pItem = new COleDocObjectItem(m_pDoc);
CLSID clsid;
::CLSIDFromProgID(L"Word.Document",&clsid);
// Create the Word embedded item.
m_pItem->CreateNewItem(clsid);
m_pItem->Activate(OLEIVERB_SHOW, m_pEditView);
}
CATCH(CException, e)
....
If I debug, I'll se that the call:
SCODE sc = m_lpObject->DoVerb(nVerb, lpMsg, lpClientSite, -1,
hWnd, lpPosRect);
in:
void COleClientItem::Activate(LONG nVerb, CView* pView, LPMSG lpMsg)
in the file olecli3.cpp fails with a returncode.
I tried to google the return and didn't a single hit.
I have tried to search for information about this and what have changed
between vs 2003 and vs 2005 with no luck.
Anyone got any ideas what the problem might be and what to do about it?