Location

WWW

Interests

Hi
I am trying to embed an icon control and an AVI control in the status bar but the problem is they won't retain their transparency.
An example:
#include <GuiStatusBar.au3>
#include <GUIConstantsEx.au3>
Global $WindowMain = GUICreate("Example", 351, 176, -1, -1)
GUISetBkColor( 0xDDDDDD, $WindowMain )
Global $Statusbar = _GUICtrlStatusBar_Create($WindowMain)
Global $Statusbar_PartsWidth[2] = [324, -1]
_GUICtrlStatusBar_SetParts($Statusbar, $Statusbar_PartsWidth)
_GUICtrlStatusBar_SetText($Statusbar, "", 0)
_GUICtrlStatusBar_SetText($Statusbar, "", 1)
_GUICtrlStatusBar_SetMinHeight($Statusbar, 20)
GUISetState(@SW_SHOW)
$Icon = GUICtrlCreateIcon('ico.ico',-1,300,130,16,16) ;Icon on GUI
;Without this the icon will not be tranparent. No idea why.
GUICtrlSetState($icon, $GUI_SHOW)
$Icon2 = GUICtrlCreateIcon('ico.ico',-1,10,10,16,16)
_GUICtrlStatusBar_EmbedControl($Statusbar, 1, GUICtrlGetHandle($Icon2), 1+2)
; This has no effect. Icon has a white square around it
GUICtrlSetState($icon2, $GUI_SHOW)
$AVI = GUICtrlCreateAvi( 'avi.avi',0,250,130,16,16)
GUICtrlSetState( $AVI, 1 )
$AVI2 = GUICtrlCreateAvi( 'avi.avi',0,250,130,16,16)
GUICtrlSetState( $AVI2, 1 )
_GUICtrlStatusBar_EmbedControl($Statusbar, 0, GUICtrlGetHandle($AVI2), 1+2)
Global $GuiMsg
Do
$GuiMsg = GUIGetMsg()
Until $GuiMsg = $GUI_EVENT_CLOSE
I've tried a couple of things like using _GUICtrlStatusBar_SetIcon() or GDIplus for icons and that works and the icons are transparent. As for the AVI, I tried faking a status bar by drawing some lines at the buttom of the window and that worked ok too, But I'd love to be able to use it with a real status bar.
example.zip