HeaderPane
Main
Hide
Share Link
Print

DropDownButtonPicture

Defines the picture displayed on the dropdown button.

C

void WINAPI SftBox_GetDropDownButtonPicture(HWND hwndCtl, LPSFT_PICTURE lpPicture);
void WINAPI SftBox_SetDropDownButtonPicture(HWND hwndCtl, LPCSFT_PICTURE lpPicture);

C++

void CSftBox::GetDropDownButtonPicture(LPSFT_PICTURE lpPicture) const;
void CSftBox::SetDropDownButtonPicture(LPCSFT_PICTURE lpPicture);

Parameters

hwndCtl

The window handle of the combo box control.

lpPicture

A pointer to a SFT_PICTURE structure.

GetDropDownButtonPicture: The structure will be updated with the picture currently defined. If no picture is defined, an empty picture is returned.

SetDropDownButtonPicture: The picture to be displayed on the dropdown button. This parameter may be NULL to remove the picture.

Returns

None.

Comments

The GetDropDownButtonPicture and SetDropDownButtonPicture functions define the picture displayed on the dropdown button.

By default, no picture is defined and the dropdown button displays an arrow. Once a picture is defined, it replaces the arrow.

The dropdown button is at least as wide as a vertical scroll bar. If the picture is wider, the dropdown button is enlarged so the picture can be displayed with a small margin. This does not apply to the dropdown button styles SFTBOX_DDBUTTON_BUTTONHOVER and SFTBOX_DDBUTTON_BUTTONHOVERNT (see SetDropDownButtonStyle), where the button is sized based on its picture.

A different picture can be displayed while the dropdown portion is shown by using SetDropDownButtonDroppedPicture.

A simple combo box does not have a dropdown button, so the picture is not used.

Examples

C View entire sample code

    SftBox_SetColumns(hwndBox, 2, aCols);
    SftBox_SetShowHeaderDropDown(hwndBox, TRUE);// Column titles in the dropdown only
    SftBox_SetDropDownOptimalWidth(hwndBox, TRUE);// The dropdown is as wide as its columns
    SftBox_SetDarkMode(hwndBox, SFTBOX_DARKMODE_AUTO);

    // A picture instead of the arrow on the dropdown button
    Sft_InitPicture(&Picture);
    Sft_SetPictureIcon(&Picture, m_ahIcons[ICON_FIND]);
    SftBox_SetDropDownButtonPicture(hwndBox, &Picture);

    // Register the item picture size. Only one picture needs to be
    // registered, even if several are used.
    Sft_InitPicture(&Picture);
    Sft_SetPictureIcon(&Picture, m_ahIcons[ICON_DRIVE]);
    SftBox_SetItemPicture(hwndBox, -1, &Picture);

C++ View entire sample code

    m_Devices.SetColumns(2, aCols);
    m_Devices.SetShowHeaderDropDown(TRUE);// Column titles in the dropdown only
    m_Devices.SetDropDownOptimalWidth(TRUE);// The dropdown is as wide as its columns
    m_Devices.SetDarkMode(SFTBOX_DARKMODE_AUTO);

    // A picture instead of the arrow on the dropdown button
    Sft_InitPicture(&Picture);
    Sft_SetPictureIcon(&Picture, m_ahIcons[ICON_FIND]);
    m_Devices.SetDropDownButtonPicture(&Picture);

    // Register the item picture size. Only one picture needs to be
    // registered, even if several are used.
    Sft_InitPicture(&Picture);
    Sft_SetPictureIcon(&Picture, m_ahIcons[ICON_DRIVE]);
    m_Devices.SetItemPicture(-1, &Picture);

See Also C/C++ API | Categories | Notifications


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.