HeaderPane
Main

SftPicture2 Documentation

Share Link
Print

Sft_GetPictureSize

Return the pixel width and height of a populated SFT_PICTURE. Handles every supported SFT_PICTURE_* type and dispatches to the appropriate measurement (bitmap dimensions, icon dimensions, image-list cell size, GDI+ image size, COM picture HIMETRIC conversion, embedded width / height fields, etc.).

C

void WINAPI Sft_GetPictureSize(LPSFT_PICTURE lpPicture, LPINT lpWidth, LPINT lpHeight);

Parameters

lpPicture

Pointer to a SFT_PICTURE. NULL is accepted and returns zero in both output parameters.

lpWidth

Pointer to an int that receives the picture width in pixels. May be NULL if the caller only needs the height.

lpHeight

Pointer to an int that receives the picture height in pixels. May be NULL if the caller only needs the width.

Comments

Sft_GetPictureSize is the only function in SftPicture2.h that is not inline - it is exported from the per-product DLL because the per-type measurement logic is large enough that inlining it across every translation unit would be wasteful.

For an empty slot (type = 0), the function returns 0 in both output parameters.

The returned dimensions are in physical pixels at the picture's native resolution. Per-product image / pixel scaling settings (where supported) are not applied here - they apply at draw time inside the host control.

See Also SftPicture2 | SFT_PICTURE


Last Updated 05/09/2026 - (email)
© 2026 Softel vdm, Inc.