CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  ATL/ActiveX/COM

使用PDF.ocx的问题

楼主chenkan2000(【超级无敌掌门猪】)2004-08-03 11:46:46 在 VC/MFC / ATL/ActiveX/COM 提问

我用import方式把pdf.ocx加入工程:  
  #import   "D:\Program   Files\Adobe\Acrobat   6.0\Acrobat\ActiveX\pdf.ocx"   rename_namespace("pdfReaderX")    
  using   namespace   pdfReaderX;  
   
  VC6生成pdf.tli和pdf.tlh。我把这俩个文件加入工程,然后在CView中定义一个变量  
  _DPdf   m_pdf;  
  编译时报错:  
  error   C2259:   '_DPdf'   :   cannot   instantiate   abstract   class   due   to   following   members:  
                  d:\pdfocx\debug\pdf.tlh(37)   :   see   declaration   of   '_DPdf'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IUnknown::QueryInterface(const   struct   _GUID   &,void   **   )'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(109)   :   see   declaration   of   'QueryInterface'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'unsigned   long   __stdcall   IUnknown::AddRef(void)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(113)   :   see   declaration   of   'AddRef'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'unsigned   long   __stdcall   IUnknown::Release(void)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(115)   :   see   declaration   of   'Release'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetTypeInfoCount(unsigned   int   *)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2697)   :   see   declaration   of   'GetTypeInfoCount'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetTypeInfo(unsigned   int,unsigned   long,struct   ITypeInfo   **   )'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2700)   :   see   declaration   of   'GetTypeInfo'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetIDsOfNames(const   struct   _GUID   &,unsigned   short   **   ,unsigned   int,unsigned   long,long   *)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2705)   :   see   declaration   of   'GetIDsOfNames'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::Invoke(long,const   struct   _GUID   &,unsigned   long,unsigned   short,struct   tagDISPPARAMS   *,struct   tagVARIANT   *,struct   tagEXCEPINFO   *,unsigned   int   *)'   :   pure   virtual   function   w  
  as   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2712)   :   see   declaration   of   'Invoke'  
  PDFOcxView.cpp  
  d:\pdfocx\pdfocxview.h(34)   :   error   C2259:   '_DPdf'   :   cannot   instantiate   abstract   class   due   to   following   members:  
                  d:\pdfocx\debug\pdf.tlh(37)   :   see   declaration   of   '_DPdf'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IUnknown::QueryInterface(const   struct   _GUID   &,void   **   )'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(109)   :   see   declaration   of   'QueryInterface'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'unsigned   long   __stdcall   IUnknown::AddRef(void)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(113)   :   see   declaration   of   'AddRef'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'unsigned   long   __stdcall   IUnknown::Release(void)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(115)   :   see   declaration   of   'Release'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetTypeInfoCount(unsigned   int   *)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2697)   :   see   declaration   of   'GetTypeInfoCount'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetTypeInfo(unsigned   int,unsigned   long,struct   ITypeInfo   **   )'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2700)   :   see   declaration   of   'GetTypeInfo'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetIDsOfNames(const   struct   _GUID   &,unsigned   short   **   ,unsigned   int,unsigned   long,long   *)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2705)   :   see   declaration   of   'GetIDsOfNames'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::Invoke(long,const   struct   _GUID   &,unsigned   long,unsigned   short,struct   tagDISPPARAMS   *,struct   tagVARIANT   *,struct   tagEXCEPINFO   *,unsigned   int   *)'   :   pure   virtual   function   w  
  as   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2712)   :   see   declaration   of   'Invoke'  
  CntrItem.cpp  
  d:\pdfocx\pdfocxview.h(34)   :   error   C2259:   '_DPdf'   :   cannot   instantiate   abstract   class   due   to   following   members:  
                  d:\pdfocx\debug\pdf.tlh(37)   :   see   declaration   of   '_DPdf'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IUnknown::QueryInterface(const   struct   _GUID   &,void   **   )'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(109)   :   see   declaration   of   'QueryInterface'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'unsigned   long   __stdcall   IUnknown::AddRef(void)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(113)   :   see   declaration   of   'AddRef'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'unsigned   long   __stdcall   IUnknown::Release(void)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\unknwn.h(115)   :   see   declaration   of   'Release'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetTypeInfoCount(unsigned   int   *)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2697)   :   see   declaration   of   'GetTypeInfoCount'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetTypeInfo(unsigned   int,unsigned   long,struct   ITypeInfo   **   )'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2700)   :   see   declaration   of   'GetTypeInfo'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::GetIDsOfNames(const   struct   _GUID   &,unsigned   short   **   ,unsigned   int,unsigned   long,long   *)'   :   pure   virtual   function   was   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2705)   :   see   declaration   of   'GetIDsOfNames'  
  d:\pdfocx\pdfocxview.h(34)   :   warning   C4259:   'long   __stdcall   IDispatch::Invoke(long,const   struct   _GUID   &,unsigned   long,unsigned   short,struct   tagDISPPARAMS   *,struct   tagVARIANT   *,struct   tagEXCEPINFO   *,unsigned   int   *)'   :   pure   virtual   function   w  
  as   not   defined  
                  d:\program   files\microsoft   visual   studio\vc98\include\oaidl.h(2712)   :   see   declaration   of   'Invoke'  
  Generating   Code...  
  Error   executing   cl.exe.  
   
  请问为什么?怎么解决?  
  问题点数:0、回复次数:1Top

1 楼caygal(沙洲浪子)回复于 2004-08-06 17:30:14 得分 0

尽管我没有用过pdf.ocx,但你_DPdf   m_pdf;  
  这样用绝对是不行的,_DPdf   仅仅是一个抽象的接口类,肯定不能实例化的撒  
  可以用CoCreateInstance创建这个接口,或者用智能指针_DPdfPtr创建。Top

相关问题

  • ocx使用
  • OCX的使用
  • 使用OCX复杂问题
  • .ocx控件的使用
  • OCX控件如何在ASP上使用?
  • 在PB中如何使用ocx控件
  • 如何在pb中使用ocx?
  • 请问ocx控件怎么使用?
  • 在DELPHI中怎样使用OCX和DLL?
  • 请问ocx控件如何使用

关键词

  • vc
  • virtual
  • program
  • visual
  • microsoft
  • dpdf
  • pdfocx
  • pdfocxview
  • pdf
  • ocx

得分解答快速导航

  • 帖主:chenkan2000

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo