Toolbars can be created using the CreateWindowEx() function, specifying TOOLBARCLASSNAME as the window class name, or by using the deprecated CreateToolbarEx() function. A TBBUTTON structure contains the information describing each toolbar button. These buttons are added to the toolbar by sending the TB_ADDBUTTONS or TB_INSERTBUTTON message using the SendMessage() function. Toolbar images are stored in an image list (HIMAGELIST), which is associated with the toolbar using the TB_SETIMAGELIST message. Each toolbar button references an image in the image list through its iBitmap member. When a toolbar button is clicked, the parent window receives a WM_COMMAND message, with the button identifier stored in the low-order word of wParam.
For in-depth reading on the creation of toolbars
https://docs.microsoft.com/en-us/windows/win32/controls/toolbar-control-reference
The following short program creates a simple toolbar with two buttons using the following two images. Clicking either button will produce a message box.
