Click to Rate and Give Feedback
MSDN
MSDN Library
COM
Reference
Interfaces
 IPictureDisp Interface
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.

When To Use

Use this interface to change or retrieve the properties of a picture object.

Methods

The IPictureDisp interface inherits from the IDispatch interface but does not define additional methods or properties.

Remarks

The following table describes the dispIDs for the various picture properties.

ConstantValue
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.

PropertyTypeAccessDescription
HandleOLE_HANDLE (int) RThe Windows GDI handle of the picture
hPalOLE_HANDLE (int) RWThe Windows handle of the palette used by the picture.
TypeshortRThe type of picture (see PICTYPE).
WidthOLE_XSIZE_HIMETRIC (long) RThe width of the picture.
HeightOLE_YSIZE_HIMETRIC (long) RThe height of the picture.

 

OLE Implementation

Picture objects provide a language-neutral abstraction for bitmaps, icons, and metafiles. As with the standard font object, the system provides a standard implementation of the picture object. Its primary interfaces are IPicture and IPictureDisp. A picture object is created with OleCreatePictureIndirect and supports both the IPicture and the IPictureDisp interfaces.

The OLE-provided picture object implements the complete semantics of the IPicture and IPictureDisp interfaces.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderOCIdl.h
IDLOCIdl.idl
IIDIID_IPictureDisp is defined as 7BF80981-BF32-101A-8BBB-00AA00300CAB

See Also

IPicture

Send comments about this topic to Microsoft

Build date: 10/22/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
convert to System.Drawing.Image?      Aerodyno   |   Edit   |   Show History
How do I convert an iPictureDisp to a system.drawing.image and preserve the alpha channel?
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker