Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
Toolbar
Messages
 TB_LOADIMAGES Message
TB_LOADIMAGES Message

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

Syntax

To send this message, call the SendMessage function as follows.

lResult = SendMessage(     // returns LRESULT in lResult
   (HWND) hWndControl,     // handle to destination control
   (UINT) TB_LOADIMAGES,     // message ID
   (WPARAM) wParam,     // = (WPARAM) (INT) iBitmapID;
   (LPARAM) lParam     // = (LPARAM) (HINSTANCE) hinst;
);

Parameters

iBitmapID
Identifier of a system-defined button image list. This parameter can be set to one of the following values.

IDB_HIST_LARGE_COLOR
Microsoft Windows Explorer bitmaps in large size.
IDB_HIST_SMALL_COLOR
Windows Explorer bitmaps in small size.
IDB_STD_LARGE_COLOR
Standard bitmaps in large size.
IDB_STD_SMALL_COLOR
Standard bitmaps in small size.
IDB_VIEW_LARGE_COLOR
View bitmaps in large size.
IDB_VIEW_SMALL_COLOR
View bitmaps in small size.
IDB_HIST_NORMAL
Windows Explorer travel buttons and favorites bitmaps in normal state.
IDB_HIST_HOT
Windows Explorer travel buttons and favorites bitmaps in hot state.
IDB_HIST_DISABLED
Windows Explorer travel buttons and favorites bitmaps in disabled state.
IDB_HIST_PRESSED
Windows Explorer travel buttons and favorites bitmaps in pressed state.
hinst
Instance 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.

Remarks

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

Example

The following sample code loads the system standard small color images.

// hWndToobar is the window handle of the toolbar control.
SendMessage(hWndToolbar, TB_LOADIMAGES, (WPARAM)IDB_STD_SMALL_COLOR, (LPARAM)HINST_COMMCTRL);

Message Information

Minimum DLL Versioncomctl32.dll version 4.70 or later
Headercommctrl.h
Minimum operating systems Windows 2000, Windows NT 4.0 with Internet Explorer 3.0, Windows 98, Windows 95 with Internet Explorer 3.0

See Also

TB_ADDBITMAP
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker