Share via


CreateToolbarEx (Compact 2013)

3/28/2014

This function 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 wBMID, 
  LPCTBBUTTON lpButtons, 
  int iNumButtons, 
  int dxButton, 
  int dyButton, 
  int dxBitmap, 
  int dyBitmap, 
  UINT uStructSize 
);

Parameters

  • hwnd
    [in] Handle to the parent window for the toolbar.
  • ws
    [in] Specifies the window styles for the toolbar. This parameter must specify at least the WS_CHILD style.
  • wID
    [in] Control identifier for the toolbar.
  • nBitmaps
    [in] Number of button images contained in the bitmap specified by hBMInst and wBMID.
  • hBMInst
    [in] Handle to the module instance with the executable file that contains the bitmap resource.
  • wBMID
    [in] Resource identifier for the bitmap resource. If hBMInst is NULL, this parameter must be a valid bitmap handle.
  • lpButtons
    [in] Long pointer to an array of TBBUTTON structures that contain information about the buttons to add to the toolbar.
  • iNumButtons
    [in] Number of buttons to add to the toolbar.
  • dxButton
    [in] Specifies the width, in pixels, of the buttons to add to the toolbar.
  • dyButton
    [in] Specifies the height, in pixels, of the buttons to add to the toolbar.
  • dxBitmap
    [in] Specifies the width, in pixels, of the button images to add to the buttons in the toolbar.
  • dyBitmap
    [in] Specifies the height, in pixels, of the button images to add to the buttons in the toolbar.
  • uStructSize
    [in] Unsigned integer that contains the size of a TBBUTTON structure.

Return Value

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

Requirements

Header

commctrl.h

See Also

Reference

Toolbar Controls Functions
TBBUTTON