HeaderPane
Main

SftPicture2 Documentation

Share Link
Print

Sft_SetPictureCheckBox

Store a check box glyph in a SFT_PICTURE. Two-state (SFT_PICTURE_CB) and three-state (SFT_PICTURE_CB3) variants are provided.

C

void Sft_SetPictureCheckBox (LPSFT_PICTURE lpPicture, int state, int w, int h, BOOL fEnabled);
void Sft_SetPictureCheckBox3(LPSFT_PICTURE lpPicture, int state, int w, int h, BOOL fEnabled);

Parameters

lpPicture

Pointer to a SFT_PICTURE. Must not be NULL.

state

Glyph state.

Sft_SetPictureCheckBox0 = unchecked, 1 = checked.
Sft_SetPictureCheckBox3-1 = indeterminate, 0 = unchecked, 1 = checked.

w, h

Width and height of the glyph in pixels. h must be greater than zero - calling with h <= 0 clears the slot but does not assign a glyph.

fEnabled

TRUE for enabled appearance, FALSE for disabled (grayed) appearance.

Comments

Both setters call Sft_ClearPicture internally before assigning the new glyph. Internally each glyph is rendered through Windows themes when themes are active, falling back to the legacy GDI rendering when not.

Note: Sft_SetPictureCheckBox asserts that state is 0 or 1; Sft_SetPictureCheckBox3 asserts that state is -1, 0 or 1. Out-of-range values trip the assertion in debug builds.

See Also SftPicture2 | SFT_PICTURE | SFT_PICTURE_CB | Sft_SetPictureRadioButton | Sft_IsPictureCheckBox


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