Some notes to all interested:
1. Menu with icons is OVERDRAWN menu. Not the BITMAP menu or STRING menu
2. For overdrawn menu, Windows calls 2 times your application - first time to return width and height of the item rectangle and second time to draw it in it.
3. You can draw anything that you like in it - large icons, small icons, per item text colors, named separators etc.
4. It is very easy to do, I even managed to make it in AHK.
5. Forget about 13 pixel bitmpas. Its for checkboxes only, not important for this.
Screenshots:
www.r-moth.com/_/menu/_clip1.png (with new hot menu break feature)
www.r-moth.com/_/menu/_clip2.png (with new hot only icons menu)
For those who want to see the code, it will be available as open source AHK soon on its forum. I am creating this as general command to be used instead AHK menu command.
This is interface I created for the new menu command
Code: Select all
#SingleInstance force
;set the constants
INIT_Menu()
;create submenus
ships := Menu_Create()
Menu_Set( ships, "s64, RFF00FF, ,L20, HFF, FArial:s14", "icons\ode.ico")
Menu_Add( ships, "Infiltrator","icons\sw\Infiltrator.ico" )
Menu_Add( ships, "Starfighter", "icons\sw\naboo.ico", "s128" )
Menu_Add( ships, "X100 - Recomended by Obi","icons\sw\obi.ico" )
Menu_Add( ships, "Imperial shuttle","icons\sw\Imperial_shuttle.ico", "B" )
Menu_Add( ships, "X-Wing", "icons\sw\xwing.ico" )
Menu_Add( ships, "Slave i-b", "icons\sw\slave.ico" )
mercs := Menu_Create()
Menu_Set( mercs, "s128, L40", "")
Menu_Add( mercs, "", "icons\sw\DarthVader.ico")
Menu_Add( mercs, "", "icons\sw\r2-d2.ico" )
Menu_Add( mercs, "", "icons\sw\BobaFett.ico" )
swords := Menu_Create()
Menu_Set( swords, "s92, h0FF0FF", "icons\back.ico")
Menu_Add( swords, "s1", "icons\sw\Qui-Gon.ico" )
Menu_Add( swords, "s2", "icons\sw\Obisaber.ico" )
Menu_Add( swords, "s3", "icons\sw\Maul2.ico" )
;create main menu -----------
SWshop := Menu_Create()
Menu_Set( swshop, "h0F11FF, cA7A7A7, m20, FVerdana:s12 bold")
Menu_Add( swshop, "Find hotel room", "icons\home.ico", "s92, i101" )
Menu_Add( swshop, "Send an e-mail", "icons\pen_red.ico" ,"S32, F :s12 italic underline" )
Menu_Add( swshop, "Enter chat", "icons\chat.ico" ,"s48, F :s12 italic underline" )
Menu_Add( swshop, "By gear", "icons\gear.ico" ,"s92" )
;Add submenu
Menu_Add( swshop, "Choose service", "" ,"D, cFFFFFF, FXirod:s12", 1 )
Menu_Add( swshop, "Buy a Ship", "icons\sw\xwing.ico" ,"FCourier New:s12 bold, s128, M" ships, 2 )
Menu_Add( swshop, "Hire a Mercenary","icons\sw\BobaFett.ico" ,"FCourier New:s12 bold, s92, M" mercs, 3 )
Menu_Add( swshop, "Buy a Sword", "icons\sw\maul.ico" ,"FCourier New:s12 bold, s92, M" swords,4 )
Menu_Add( swshop, "Other", "" ,"D, cFFFFFF, FXirod:s12", 5 )
; Menu_Delete(swshop, 5)
; Menu_Delete(swshop, 1)
return
!m::
Menu_Show( swshop, 50, 50, "MyMenuHandler")
return
MyMenuHandler:
; MsgBox Title:`t%M_Title% `nID:`t%M_ID%`nMenu:`t%M_Menu%
return
#include Menu.ahk