...
function WndProc(hWnd, wMsg, wParam,lparam) as sys callback
===========================================================
static sys hdc, htools, hInstance
static tbAddBmp as TBADDBITMAP
static tbb as TBBUTTON
static iccx as INITCOMMONCONTROLSEXtype
int num=7
sys ie=num
'' bitmap for each button
' static tbBmp(7) as sys 'as BYTE
static int tbBmp at getmemory ie
...
'' apply bitmap to toolbar buttons
'
dim i,k as LONG
for i = 0 to num-1
if i=3 then k=TBSTYLE_SEP else k=TBSTYLE_BUTTON
with tbb
.iBitmap = tbBmp(i)
.fsState = TBSTATE_ENABLED
.fsStyle = k
.idCommand = -1
.dwData = 0
end with
SendMessage( hTools, TB_ADDBUTTONS, 1, @tbb)
next
end if
freememory @tbBmp
case WM_DESTROY
'===============
...