🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.reader
Article #7026

Adobe Reader 8 Fail to load file

#7026
From: Shyamkant
Date: Wed, 09 Jul 2008 10:43
35 lines
1538 bytes
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
Technical Details
Message-ID: <59b5bf40.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!feeder.visyn.net!news.svengo.de!news4us.nl!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: 10273d,40406f39e6783158,start
X-Google-Attributes: gid10273d,domainid0,public,usenet
X-Google-Language: ENGLISH,UTF8
From: Shyamkant@adobeforums.com
Newsgroups: adobe.reader
Subject: Adobe Reader 8 Fail to load file
Message-ID: <59b5bf40.-1@webcrossing.la2eafNXanI>
Date: Wed, 9 Jul 2008 03:43:48 -0700
Lines: 39
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!feeder.visyn.net!news.svengo.de!news4us.nl!webcrossing