creating an ATL control to play ppt to show slide or save ppt(office 2013 ver).then embedded into MFC Dialog. when i click 'Esc' to quit slide show,ppt quit too,it is not my mind.i just want to quit slide show,do not want to quit ppt. i do not know how to solve this problem,could anybody help me
Sample code like these:
BOOL CInstanceFactory::OpenOfficeDoc(REFCLSID rclsid,const CString &strPath)
{
pItem = new CAxDocConCntrItem(pDoc);
ASSERT_VALID(pItem);
CString strPath1 = strPath;
LPCTSTR lpszPath1 = strPath1.GetBuffer();
pItem->CreateFromFile(lpszPath1, rclsid,OLERENDER_DRAW,CF_TEXT,NULL);
m_pItem = pItem;
LPDISPATCH lpDisp = m_pItem->GetDispatch_PowerPoint();
PowerPoint::_PresentationPtr _appPresent = lpDisp;
DocumentWindowsPtr docsPtr = _appPresent->GetWindows();
PowerPoint::SlideShowSettingsPtr appSlideRun = _appPresent->GetSlideShowSettings();
SlideShowWindowPtr slideShowWidnowPtr = appSlideRun->Run();
slideShowWidnowPtr->Activate();
}
BOOL CAxDocConCntrItem::CreateFromFile(LPCTSTR lpszFileName, REFCLSID clsid,
OLERENDER render, CLIPFORMAT cfFormat, LPFORMATETC lpFormatEtc)
{
SCODE sc = ::OleCreateFromFile(clsid, T2COLE(lpszFileName),
IID_IUnknown, render, lpFormatEtc, m_lpClientSite, m_lpStorage,
(LPLP)&m_lpObject);
}