      ; ---------------------------
      ; macros for creating toolbar
      ; ---------------------------

      TBextraData MACRO
        mov tbb.fsState,   TBSTATE_ENABLED
        mov tbb.dwData,    0
        mov tbb.iString,   0
      ENDM

      ; ------------------------------

      TBbutton MACRO dwState, cID, lpString
        mov tbb.iBitmap,   0  ;; button  ID number
        mov tbb.idCommand, cID  ;; command ID number
        mov tbb.fsStyle,   TBSTYLE_BUTTON or TBSTYLE_AUTOSIZE or TBSTYLE_CHECKGROUP or TBSTYLE_GROUP
        mov tbb.fsState,   TBSTATE_ENABLED or dwState
        mov tbb.iString,   lpString
        invoke SendMessage,hToolBar,TB_ADDBUTTONS,1,ADDR tbb
      ENDM

      ; ------------------------------

      TBblank MACRO
        mov tbb.iBitmap,   0
        mov tbb.idCommand, 0
        mov tbb.fsStyle,   TBSTYLE_SEP or TBSTYLE_CHECKGROUP or TBSTYLE_GROUP
        invoke SendMessage,hToolBar,TB_ADDBUTTONS,1,ADDR tbb
      ENDM

      ; ------------------------------

      Create_Tool_Bar MACRO

        szText tbClass,"ToolbarWindow32"

        invoke CreateWindowEx,0,
                              ADDR tbClass,NULL,
                              WS_CHILD or WS_VISIBLE or TBSTYLE_FLAT or TBSTYLE_TOOLTIPS or TBSTYLE_LIST or\
                              CCS_ADJUSTABLE,
                              0,0,500,40,
                              hWin,NULL,
                              hInstance,NULL

                              

        mov hToolBar, eax
    
        invoke SendMessage,hToolBar,TB_BUTTONSTRUCTSIZE,sizeof TBBUTTON,0
           
        ;; ---------------------------------------
        ;; Put width & height of bitmap into DWORD
        ;; ---------------------------------------
        
        invoke SendMessage, hToolBar, TB_SETBITMAPSIZE, 0, 00100000h

      ENDM