CreateToolbarEx  18WIO6O 

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

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

Window styles for the toolbar. This parameter must specify at least the WS_CHILD style. It can also include a combination of styles as discussed in Toolbars and related topics.

wID

Control identifier for the toolbar.

nBitmaps

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

hBMInst

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

Pointer to an array of TBBUTTONIMY.LD structures that contains information about the buttons to add to the toolbar.

iNumButtons

Number of buttons to add to the toolbar.

dxButton

Width, in pixels, of the buttons to add to the toolbar.

dyButton

Height, in pixels, of the buttons to add to the toolbar.

dxBitmap

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

dyBitmap

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

uStructSize

Size of a TBBUTTON structure.

 

Return Values

If the function succeeds, the return value is the window handle to the toolbarl

If the function fails, the return value is NULL.

Remarks

Windows 95: The system can support a maximum of 16,364 window handles.

See Also

TBBUTTON