Table of Contents

OLEGETPICTUREPROPS method (System)

Description

Returns a dynamic array of properties for an OLE Picture object (IPicture) when passed its interface pointer.

Syntax

PicProps = Exec_Method( "SYSTEM", "OLEGETPICTUREPROPS", pObject )

Parameters

NameRequiredDescription
pObjectYesIUnknown/IID_Picture Interface pointer for the Picture object.

Returns

An @fm delimited array of properties for the picture:

<1> Picture handle (OLE_HANDLE)

<2> Palette handle (HPAL)

<3> Picture Type (PICTYPE)

<4> Width

<5> Height

<6> Current Device Context (HDC)

<7> KeepOriginalFormat flag (BOOL)

<8> Attributes

If the method fails nothing is returned.

Remarks

This method uses the OLE IPicture interface to retrieve the details for the picture object. For further information please see the IPicture topic on the MSDN website.

Example

 
//// Extract the width and height of an OLE Picture, given it's //
   //// interface pointer//
   
   PicFile  = "C:\temp\myPic.bmp"
   pPicture = Exec_Method( "SYSTEM", "OLELOADPICTURE", PicFile )
   
   If pPicture Then
      PicProps = Exec_Method( "SYSTEM", "OLEGETPICTUREPROPS", pPicture )
      
      If BLen( PicProps ) Then
         PicW = PicProps<4>
         PicH = PicProps<5>
      End
      
      //// Release the picture//
      Exec_Method( "SYSTEM", "OLEIKNOWNRELEASE", pPicture )
      
   End
 
 
 

See Also

SYSTEM OLELOADPICTURE method, SYSTEM OLE IUKNOWNRELEASE method.