• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >vc/mfc > 控件中的只读IPictureDisp属性导致控件无法在delphi下实例化,内祥!

控件中的只读IPictureDisp属性导致控件无法在delphi下实例化,内祥!

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-04

佚名通过本文主要向大家介绍了ipicturedisp,vb ipicturedisp,delphi控件大全,delphi excel控件,delphi image控件等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 控件中的只读IPictureDisp属性导致控件无法在delphi下实例化,内祥!
描述:

我用mfc写的控件,有个IPictureDisp*的属性,该属性只读,,在vb\vc下没有问题,但是在delphi下使用,在窗体上添加时总是出现错误。但是,如果把该属性改成可写的,就是添加上set方法,就没有问题了!~~搞不明白啊,,
    那位兄弟知道的,帮我分析分析??


解决方案1:

我估计delphi使用了IPictureDisp.set_hPal,不知你引入时是否可以控制一下
   Platform SDK: COM  
IPictureDisp
The IPictureDisp interface exposes the picture object's properties through Automation. It provides a subset of the functionality available through IPicture methods.
When to Implement
A picture object implements this interface along with IPicture to provide access to the picture's properties through Automation. Typically, it is not necessary to implement this interface on your own object since there is an OLE-provided picture object.
The following table describes the dispIDs for the various picture properties.
Symbol Value 
DISPID_PICT_HANDLE 0 
DISPID_PICT_HPAL 2 
DISPID_PICT_TYPE 3 
DISPID_PICT_WIDTH 4 
DISPID_PICT_HEIGHT 5 
DISPID_PICT_RENDER 6 
Each property in the IPictureDisp interface includes a get_PropertyName method if the property supports read access and a put_PropertyName method if the property supports write access. Most of the properties support read access only with the exception of the hPal property.
Property 
Type Access Allowed 
Description 
Handle OLE_HANDLE (int) R The Windows GDI handle of the picture 
hPal OLE_HANDLE (int) RW The Windows handle of the palette used by the picture. 
Type short R The type of picture (see below). 
Width OLE_XSIZE_HIMETRIC (long) R The width of the picture. 
Height OLE_YSIZE_HIMETRIC (long) R The height of the picture. 
When to Use
Use this interface to change or retrieve the properties of a picture object.
Methods in Vtable Order
IUnknown Methods Description 
QueryInterface Returns pointers to supported interfaces. 
AddRef Increments reference count. 
Release Decrements reference count. 
Requirements 
  Windows NT/2000/XP: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in ocidl.h.
See Also
IPicture 
COM Documentation Team Release: October 2002   What did you think of this topic?
Let us know.   Order a COM Documentation Team CD Online
(U.S/Canada)   (International) 
 
Requirements 
  Windows NT/2000/XP: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in ocidl.h.
See Also
IPicture 


分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 请问怎样从一个IPictureDisp指针中获得IDispatch指针。
  • Javascript中如何传递“IPictureDisp”类型的参数?
  • 我想知道IPictureDisp,不是IPicture,知道帮忙下,不少于100分
  • 控件中的只读IPictureDisp属性导致控件无法在delphi下实例化,内祥!

相关文章

  • 2017-06-04 请问怎么在ATL中与数据库连接??
  • 2017-06-05 大神小神们看看我的帖子控件绘图在IE里面的问题
  • 2017-06-05 用VC6编译一个DirectShow里的例子程序,功能就是播放一个视频文件,怎么编译不过呀?
  • 2017-06-04 MTS在WINDOWS2000中是不是叫组件服务?
  • 2017-06-05 关于多线程的一个弱弱的问题
  • 2017-06-04 初学com,疑惑多多,都是基础问题请大家不吝赐教!100分酬谢
  • 2017-06-04 关于DISPID_ONADDRESSBAR
  • 2017-06-04 请教各位高手如何在com组件中使用安全数组传递一个string类型的数组
  • 2017-06-05 对MultiMediaTimer不熟,有两个问题?
  • 2017-06-05 线程同步问题,急!

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 怎样写DLL
    • 请问如何远程关闭一个NT机器的服务,进程,该机器
    • 救命:如何在网页上给BCB5写的ActvieForm写的ocx控件初始化的属性
    • 程序什么时候应该使用线程,什么时候单线程效率高
    • 为什么Vc写的dll库在vc下好用,在delphi下不能用?
    • 急excell操作取不到列的数据
    • Mscom串口通信发送16进制数异常
    • 关于dll中显示对话框的问题
    • 跪求在OUTLOOK中导出未读邮件的方法
    • 组件聚合的问题

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有