CreateToolbarEx

This function creates a toolbar window and adds the specified buttons to the toolbar.

At a Glance

Header file: Commctrl.h
Windows CE versions: 2.0 and later

Syntax

HWND CreateToolbarEx(HWND hwnd, DWORD ws, UINT wID,
int
nBitmaps, HINSTANCE hBMInst, UINT wBMID,
LPCTBBUTTON
lpButtons, int iNumButtons, int dxButton, int dyButton,
int
dxBitmap, int dyBitmap, UINT uStructSize);

Parameters

hwnd

Handle to the parent window for the toolbar.

ws

Specifies the window styles for the toolbar. This parameter must specify at least the WS_CHILD style.

wID

Control identifier for the toolbar.

nBitmaps

Number of button images contained in the bitmap specified by hBMInst and wBMID.

hBMInst

Handle to the module instance with the executable file that contains the bitmap resource.

wBMID

Resource identifier for the bitmap resource. If hBMInst is NULL, this parameter must be a valid bitmap handle.

lpButtons

Long pointer to an array of TBBUTTON structures that contain information about the buttons to add to the toolbar.

iNumButtons

Number of buttons to add to the toolbar.

dxButton

Specifies the width, in pixels, of the buttons to add to the toolbar.

dyButton

Specifies the height, in pixels, of the buttons to add to the toolbar.

dxBitmap

Specifies the width, in pixels, of the button images to add to the buttons in the toolbar.

dyBitmap

Specifies the height, in pixels, of the button images to add to the buttons in the toolbar.

uStructSize

Unsigned integer that contains the size of a TBBUTTON structure.

Return Values

The window handle to the toolbar indicates success. NULL indicates failure. To get extended error information, call GetLastError.

See Also

TBBUTTON