Help Center

CToolbar.LoadImagesmethod

Loads system-defined button images into a toolbar control's image list.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION LoadImages (BYVAL hToolbar AS HWND, BYVAL iBitmapID AS DWORD, BYVAL hinst AS HINSTANCE) AS LONG
FUNCTION LoadImages (BYVAL hToolbar AS HWND, BYVAL iBitmapID AS DWORD) AS LONG

Parameters

NameDescription
hToolbarHandle to the toolbar control.
iBitmapIDIdentifier of a system-defined button image list. This parameter can be set to one of the following values (see below).
hInstInstance handle. This parameter must be set to HINST_COMMCTRL.

Return value

The count of images in the image list. Returns zero if the toolbar has no image list or if the existing image list is empty.

Description

Loads system-defined button images into a toolbar control's image list.

Remarks

You must use the proper image index values when you prepare TBBUTTON structures prior to sending the TB_ADDBUTTONSW message. For a list of image index values for these preset bitmaps, see Toolbar Standard Button Image Index Values.

Reference

  • Include file CToolbar.inc
  • Defined in AfxNova/CToolbar.inc:909
  • Documented in Windows/WIndows Controls/CToolbar Class.md
  • Topic: CToolbar Class