jcpetu Posted December 28, 2010 Posted December 28, 2010 Hello, I was trying to create a toolbar with images from an Imagelist, but I can not get the buttons background grey.Any help will be appreciated.Happy new year for this wonderfull comunity. #include <GuiToolbar.au3>#include <GuiImageList.au3>#include <GuiConstantsEx.au3>#include <WindowsConstants.au3>Local $hGUI, $hToolbar, $hNormal, $hDisabled, $hHot,$hImageLocal Enum $idNew = 1000, $id1,$id2,$id3,$id4,$id5,$id6; Create GUI $hGUI = GUICreate("Toolbar", 400, 300);GUISetBkColor(0xffff00) $hToolbar = _GUICtrlToolbar_Create($hGUI); Create image list $hImage = _GUIImageList_Create(16,16) ;_GUIImageList_SetBkColor($hImage, $CLR_NONE) ;_GUIImageList_AddMasked($hImage, _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 0xfcfcfc,110)) ; _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 110) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 131) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 165) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 168) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 137) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 146)_GUIImageList_SetBkColor($hImage, $CLR_NONE) _GUICtrlToolbar_SetImageList($hToolbar, $hImage); Add buttons _GUICtrlToolbar_AddButton($hToolbar, $id1,0) _GUICtrlToolbar_AddButton($hToolbar, $id2,1) _GUICtrlToolbar_AddButtonSep ($hToolbar) _GUICtrlToolbar_AddButton($hToolbar, $id3,2) _GUICtrlToolbar_AddButton($hToolbar, $id4,3) _GUICtrlToolbar_AddButtonSep ($hToolbar) _GUICtrlToolbar_AddButton($hToolbar, $id5,4) _GUICtrlToolbar_AddButton($hToolbar, $id6,5) ;$fStyle = _GUICtrlToolbar_GetStyleTransparent($hToolbar) ;_GUICtrlToolbar_SetStyleTransparent($hToolbar, $fStyle) ;_GUICtrlToolbar_SetColorScheme($hToolbar, 0x00ffff, 0x800000) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE
rover Posted December 29, 2010 Posted December 29, 2010 help file entry for _GUIImageList_Create() Image color depth: 5 - Use a 32 bit DIB section $hImage = _GUIImageList_Create(16, 16, 5) I see fascists...
jcpetu Posted December 29, 2010 Author Posted December 29, 2010 Rover, thanks a lot for the help. It works fine know. I read help file but I did not understand I had to use this parameter. Happy new year for you and your family.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now