Date: 02-16-2022
Return to Index
created by gbSnippets
'To create a transparent toolbar, one that lets the parent dialog color be visible,
'use the TBStyle_Flat and %TBStyle_Transparent styles.
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
Global hDlg,hDlgA As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Test Code",300,300,200,100, %WS_OverlappedWindow To hDlg
Dialog Set Color hDlg, %Black, %rgb_LightBlue
'add toolbar
Control Add Toolbar, hDlg, 500,"", 0,0,0,0, %TbStyle_Flat Or %TbStyle_Transparent
'create buttons
Toolbar Add Button hDlg, 500, 1, 200, %TbStyle_Button, "x"
Toolbar Add Button hDlg, 500, 2, 201, %TbStyle_Button, "y"
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
End Select
End Function
'gbs_01121
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm