All of my coding uses an .RC file for screens. The bar is standard FWH.
Control in .rc file:
CONTROL "", 100, "TBar", 0|WS_CHILD|WS_VISIBLE, 0,0, 660, 30
Code for the button bar:
// Define the button bar
REDEFINE BUTTONBAR oBarInv ID 100 SIZE 60,55 OF oDiw 2015
oBarInv:bClrGrad := aPubGrad
DEFINE BUTTON oBtn1 OF oBarInv RESOURCE "HRADD" PROMPT "Add" TOOLTIP "Add a new part record" ;
ACTION ( oLbxin:gobottom(), ::oInventory:AddNewPart(), oLbxin:refresh( ),;
::oPart:load(), oDiw:update( ), oNum:setfocus( ) ) GROUP LABEL "Parts"
DEFINE BUTTON oBtn2 OF oBarInv RESOURCE "HRSAVE" PROMPT "Save" TOOLTIP "Save this record" ;
ACTION ( ::oPart:save( ), oLbxin:refresh(), oDiw:update( ), oLbxin:setfocus( ), oLbxin:skip(0) )
DEFINE BUTTON oBtn4 OF oBarInv RESOURCE "HRDELETE" PROMPT "Delete" TOOLTIP "Delete the selected part";
ACTION ( ::oInventory:DeletePart( ), oLbxin:skip(1), ::oPart:load(), oDiw:update(), oLbxin:setfocus( ) ) ;
//. Add in more buttons here
//
DEFINE BUTTON oBtn0 OF oBarInv RESOURCE "HRHELP" PROMPT "Help" TOOLTIP "OnLine Manual" ;
ACTION WinExec( "hh asw10.chm" ) GROUP BTNRIGHT
DEFINE BUTTON oBtn7 OF oBarInv RESOURCE "HREXIT" PROMPT "Exit" TOOLTIP "Exit inventory" ;
ACTION ( oDiw:end( ), ::oInventory:end( ) ) BTNRIGHT
You can also define the menus for buttons ... and it all works quite smoothly. You will notice that I'm using data objects. I use tData / tRecord. The browse references the file as a tData object. A tRecord object is created, and each time a new record is highlighted, the :load() places the values of that record into that object. The gets all reference the tRecord object. It is very smooth.
You can add as many buttons as you wish
The icons are all created inhouse for this application, and are proprietary so I can't post them. However, I use Axialis Icon Workshop to create them, and save them as .bmp files ( 32x32 ) then include them all in the .rc file.