OleLoadPictureFileEx function (olectl.h)
Loads a picture from a file.
Syntax
WINOLECTLAPI OleLoadPictureFileEx(
[in] VARIANT varFileName,
[in] DWORD xSizeDesired,
[in] DWORD ySizeDesired,
[in] DWORD dwFlags,
[out] LPDISPATCH *lplpdispPicture
);
Parameters
[in] varFileName
The path and name of the picture file to load.
[in] xSizeDesired
The desired length for the picture to be displayed.
[in] ySizeDesired
The desired height for the picture to be displayed.
[in] dwFlags
The desired color depth for the icon or cursor. Together with the desired size it is used to select the best matching image.
[out] lplpdispPicture
The location that receives a pointer to the picture.
Return value
This method returns standard COM error codes in addition to the following values.
Return code | Description |
---|---|
|
The method completed successfully. |
|
varFileName is not valid. |
Remarks
Recognized graphic formats include bitmap (.bmp), JPEG (.jpg), GIF (.gif), and PGN (.png) files.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | olectl.h |
Library | OleAut32.lib |
DLL | OleAut32.dll |