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