{oapdf_gg}
Office software is closely linked to the PDF,the PDF is also must have to control!      Set home Page  Add to Favorites  
You are here:Home > OA info > WORD info and download
WORD info and download
MFC application in dynamic embedded Word document
Finishing by: Date:2009-08-01 10:01:04 Popularity: Tags:


  
In order to obtain the standard COM interface IDispach, type in CCntrItem add LPDISPATCH return data type for the GetIDispatch () function, which through the QueryInterface () method of the query interface IID_Idispatch be directed back to IDispach interface pointer:


ASSERT_VALID(this);
ASSERT(m_lpObject != NULL);
LPUNKNOWN lpUnk = m_lpObject;
Run();
LPOLELINK lpOleLink = NULL;
if(m_lpObject->QueryInterface(IID_IOleLink,(LPVOID FAR*)&lpOleLink)== NOERROR)
{
 ASSERT(lpOleLink != NULL);
 lpUnk = NULL;
 if(lpOleLink->GetBoundSource(&lpUnk) != NOERROR)
 {
  TRACE0("Warning: Link is not connected!n");
  lpOleLink->Release();
 }
 ASSERT(lpUnk != NULL);
}
LPDISPATCH lpDispatch = NULL;
if(lpUnk->QueryInterface(IID_IDispatch,(LPVOID FAR*)&lpDispatch) != NOERROR)
{
 TRACE0("Waring: does not support IDispatch!n");
 return NULL;
}
ASSERT(lpDispatch != NULL);
return lpDispatch;

  
In order to use the type library would require the use of type library to add the local "MSWord8.h" references (such as the use of Word 2000, will contain "MSWord9.h" reference).
there isArticle InformationsComment Information
Category column

Site Help | Site Map | Feedback |
OAPDF.COM Copyright 2009 V1.1