here is my script-stuff to create ownerdrawn menuitems with icons and colors.
It uses GUIRegisterMsg() and WM_DRAWITEM / WM_MEASUREITEM - messages proceeding.
!!! Warning: Script breaking !!!
Please change the following commands to:
_TrayCreateMenu(Text , ...)
- Fixed: some old values (thanks to aGorilla)
- Fixed: ..SetText() functions (thanks to MrCreatoR)
- Added the following commands:
_SetMenuIconBkGrdColor(Color) ; set icon background gradient color
_SetTrayIconBkGrdColor(Color) ; set icon background gradient color
New sidebar menu commands:
_CreateSideMenu(MenuID) ; returns a SideMenuID/index
_DeleteSideMenu(SideMenuID) ; delete a menu sidebar
_SetSideMenuText(SideMenuID, Text) ; set a text for the sidebar
_SetSideMenuColor(SideMenuID, Color) ; set text color
_SetSideMenuBkColor(SideMenuID, Color) ; set text background color
_SetSideMenuBkGradColor(SideMenuID, Color) ; set text background gradient color
_SetSideMenuImage(SideMenuID, Bitmapfile [, Resourcename/number [, Expand/Compress Bitmap]])
Just take a look into the samples how to use them!
At the moment there are some known issues:
- missing 64bit compatibility (already in progress, to fully work with "AutoIt3_x64.exe")
- moving the mouse cursor on the sidebar menu image/text also changes the current menu item selection
- for sidebar menu image only bitmaps are supported at the moment (min.8bpp)
!!! Warning: Please update all your scripts and add after _TrayIconCreate() the command _TrayIconSetState() - otherwise you will not see any tray icons!!!
Also update your icon numbers like for GUI icons
- Fixed: some things (thanks to nickston)
- Changed: _TrayIconCreate() do not show automatically the icon
- Changed: icon behaviour now more similar to GUI icons (I hope)
- Added: command.txt
- Removed: unicode macro
- Changed: dynamic array sizing of the saved menu items
- Added: _TrayDeleteItem(menuID), _GUICtrlODMenuItemDelete($nID) - please delete menu (items) with these commands
- Added: _TrayIconSetState() modes 4 and 8 for flashing and flashstopping of tray icons
- Added: _SetFlashTimeOut([timeOut]) to set the flash timeout
- Added: OnEvent sample
- Fixed: GDI object overload while using bold font
- Added: _TrayItemSetSelIcon(ItemID, IconFile, IconID) - set the icon if the item is selected
- Added: _GUICtrlODMenuItemSetIcon(ItemID, IconFile, IconID) - set the icon of the item
- Added: _GUICtrlODMenuItemSetSelIcon(ItemID, IconFile, IconID) - set the icon if the item is selected
- Added: "ModernMenuRaw.au3" which only includes the unknown constants, should better work with 'Au3Check' now
- Fixed: Missing underscore in "CreateMenuFontByName"-function (Font fallback function) (thanks to MsCreatoR and GEOSoft).
- Changed: If a menuitem is disabled then the rect only is showing around the item
- Added: Underscore in menutext only showing when pressing "Alt"-key
- Changed: 'local' Dll calls to global DllOpen to speedup (some virusscanners sometimes slowdown the process cause of opening these Dll's again and again)
- Added: Using of @Tab for accelerator showing/drawing
- Changed: all stuff in only 1 ZIP file
- Fixed: now works with 22.214.171.124 and 126.96.36.199
- Fixed: error in _TrayIconDelete() and new creation
- Added: additional parameter to _TrayIconCreate(ToolTip, IconFile, IconID, Callback, Msg, hIcon) to use existing icon handles
- Added: sample_Win2Tray: 'moves' all minimized windows to the tray
- Fixed: wrong call of function CreateFont() - Thanks to SleepyExtreme for info
- Changed: included samples to demonstrate using of icon clicks
- Fixed: missing function: LoadIcon()
- added bold item support - limited to menuitems only, menus are not supported
- now you can also menu icons for the tray
- added commands for Tray:
So you can have more than 1 tray icon for 1 Autoit3-script.
- now works with unicode (188.8.131.52)
- new command: _GUICtrlODMenuItemSetText(ControlID, NewText)
- added Checked-state for normal menu items and radio menu items
- added a like ModernMenuLib-script for easier create/use these menustuff (see sample in the ModernMenuLib-folder)
Edited by Holger, 06 May 2008 - 10:06 PM.