SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTree/NET 2.0 - Tree Control
Store an HICON in a SFT_PICTURE as one of the icon-bearing types (SFT_PICTURE_ICON, SFT_PICTURE_ICON_32x32 or SFT_PICTURE_ICON_16x16).
C
void Sft_SetPictureIcon(LPSFT_PICTURE lpPicture, HICON hIcon); void Sft_SetPictureIcon_32x32(LPSFT_PICTURE lpPicture, HICON hIcon); void Sft_SetPictureIcon_16x16(LPSFT_PICTURE lpPicture, HICON hIcon);
lpPicture
Pointer to a SFT_PICTURE. Must not be NULL.
hIcon
Icon handle. NULL leaves the slot empty (the existing picture is cleared).
Sft_SetPictureIcon sets type SFT_PICTURE_ICON, which accepts an icon of any size. This is the recommended call for new code.
Sft_SetPictureIcon_32x32 and Sft_SetPictureIcon_16x16 are discontinued variants that set the SFT_PICTURE_ICON_32x32 (alias for SFT_PICTURE_ICON, value 1) and SFT_PICTURE_ICON_16x16 (value 33) types respectively. They exist for back-compatibility with applications written before SFT_PICTURE_ICON accepted any size. New code should use Sft_SetPictureIcon regardless of the icon's pixel dimensions.
Each setter calls Sft_ClearPicture internally before assigning the new icon.
Resource ownership: the application owns the HICON and must keep it alive until the SFT_PICTURE is cleared or the host control is destroyed. Use DestroyIcon to release the icon when the application is done with it.
See Also SftPicture2 | SFT_PICTURE | SFT_PICTURE_ICON | Sft_IsPictureIcon
