CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    54

    StdPicture in VC++ ?

    Hi,

    Does anybody know how to create StdPicture object in VC++ and load some picture into it?

    (CoCreateInstance(CLSID_StdPicture, NULL,
    CLSCTX_INPROC_SERVER, ID_IPicture... ? )

    Zoran.



  2. #2
    Join Date
    Apr 1999
    Posts
    19

    Re: StdPicture in VC++ ?

    You can use the OLECreatePictureIndirect API call to create the picture object.

    This method takes in three paramters. The first is a PICTDESC structure. This structure specifies certain attributes of the picture object to be created. The second parameter is the REFIID of the interface that it returns. To get an IPictureDisp pointer back from this method, specify IID_IPictureDisp. The third parameter is boolean, and specifies whether or not the caller is responsible for destroying the handle to the bitmap when they are done with it.

    The method returns a (void**). The type of this pointer depends on the REFIID you specify in the second parameter.

    Hope this helps


  3. #3
    Join Date
    Apr 1999
    Posts
    19

    Re: StdPicture in VC++ ?

    You can use the OLECreatePictureIndirect API call to create the picture object.

    This method takes in three paramters. The first is a PICTDESC structure. This structure specifies certain attributes of the picture object to be created. The second parameter is the REFIID of the interface that it returns. To get an IPictureDisp pointer back from this method, specify IID_IPictureDisp. The third parameter is boolean, and specifies whether or not the caller is responsible for destroying the handle to the bitmap when they are done with it.

    The method returns a (void**). The type of this pointer depends on the REFIID you specify in the second parameter.

    Hope this helps


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured