CreateToolbarEx function (commctrl.h)
Creates a toolbar window and adds the specified buttons to the toolbar.
Syntax
HWND CreateToolbarEx(
HWND hwnd,
DWORD ws,
UINT wID,
int nBitmaps,
HINSTANCE hBMInst,
UINT_PTR wBMID,
LPCTBBUTTON lpButtons,
int iNumButtons,
int dxButton,
int dyButton,
int dxBitmap,
int dyBitmap,
UINT uStructSize
);
Parameters
hwnd
Type: HWND
Handle to the parent window for the toolbar.
ws
Type: DWORD
Window styles for the toolbar. The WS_CHILD style is included by default. This parameter can also include a combination of styles as discussed in Toolbar Control and Button Styles.
wID
Type: UINT
Control identifier for the toolbar.
nBitmaps
Type: int
Number of button images contained in the bitmap specified by hBMInst and wBMID.
hBMInst
Type: HINSTANCE
Module instance with the executable file that contains the bitmap resource.
wBMID
Type: UINT_PTR
Resource identifier for the bitmap resource. If hBMInst is NULL, this parameter must be a valid bitmap handle.
lpButtons
Type: LPCTBBUTTON
Pointer to an array of TBBUTTON structures that contain information about the buttons to add to the toolbar.
iNumButtons
Type: int
Number of buttons to add to the toolbar.
dxButton
Type: int
Width, in pixels, of the buttons to add to the toolbar.
dyButton
Type: int
Height, in pixels, of the buttons to add to the toolbar.
dxBitmap
Type: int
Width, in pixels, of the button images to add to the buttons in the toolbar.
dyBitmap
Type: int
Height, in pixels, of the button images to add to the buttons in the toolbar.
uStructSize
Type: UINT
Size of a TBBUTTON structure.
Return value
Type: HWND
Returns the window handle to the toolbar if successful, or NULL otherwise. To retrieve extended error information, call GetLastError.
Remarks
Windows 95: The system can support a maximum of 16,364 window handles.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | commctrl.h |
Library | Comctl32.lib |
DLL | Comctl32.dll |
API set | ext-ms-win-shell-comctl32-window-l1-1-0 (introduced in Windows 10, version 10.0.14393) |