guides:programming:programmers_reference_manual:olegetpictureprops_method_system

OLEGETPICTUREPROPS method (System)

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

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

NameRequiredDescription
pObjectYesIUnknown/IID_Picture Interface pointer for the Picture object.

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.

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.

 
//// 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
 
 
 

SYSTEM OLELOADPICTURE method, SYSTEM OLE IUKNOWNRELEASE method.

  • guides/programming/programmers_reference_manual/olegetpictureprops_method_system.txt
  • Last modified: 2023/10/25 10:50
  • by 127.0.0.1