How do I use a Toolbar control from the dialog editor
The toolbar control from the dialog editor needs some setup. Once it is added to a dialog it is essentially a blank window. You must add buttons and an image list in order to use it. The following is an example of a toolbar initialization for a resource based toolbar.
.const TBNumOfBtn equ 5 ; Note the IML_BTNx constants are the index# of the button in an imagelist TBBtnArray TBBUTTON <IML_BTN1, IDC_TBB01, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0> TBBUTTON <NULL, NULL, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0> TBBUTTON <IML_BTN2, IDC_TBB02, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0> TBBUTTON <IML_BTN3, IDC_TBB03, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0> TBBUTTON <IML_BTN4, IDC_TBB04, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0> IDC_TBB01 equ 101 IDC_TBB02 equ 102 IDC_TBB03 equ 103 IDC_TBB04 equ 104 .code invoke SendDlgItemMessage, hDlg, TBR1, TB_SETIMAGELIST, 0, hIML invoke SendDlgItemMessage, hDlg, TBR1, TB_ADDBUTTONS, TBNumOfBtn, ADDR TBBtnArray