Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe 8 LoadFile failed

Not applicable
Hi,

I am using following to load pdf file in my aplication.



#include "pdf.h"



class CViewPDFDlg : public CDialog

{

ãprotected:

ãã_DPdf m_drvPDF; // PDF

ããCWnd m_wndPDF; ãã

... ...



--------------------------------------------------------------------------

And OninitDialog

{

ModifyStyle(0, WS_CLIPCHILDREN);



CRect rt;

GetClientRect(&rt);



m_wndPDF.CreateControl("AcroPDF.PDF.1", NULL, WS_CHILD | WS_VISIBLE, rt, this, 0);

LPUNKNOWN lpUnknown = m_wndPDF.GetControl Unknown();

LPDISPATCH lpDispatch;

lpUnknown->QueryInterface(IID_IDispatch, (void**)&lpDispatch);

m_drvPDF.AttachDispatch(lpDispatch);

CFileDialog dlg(TRUE);

if (dlg.DoModal() == IDOK)

ãm_drvPDF.LoadFile(dlg.GetPathName());

else

ãOnCancel();

}



So this code works for "PDF.PdfCtrl.5" Reader V 6. But is is not working for "AcroPDF.PDF.1". It fails for LoadFile. What is wrong with this code?



Shyamkant
0 Replies