Icon in menu
BlitzPlus Forums/BlitzPlus Programming/Icon in menu
| ||
Anyone know how to add icon in menu? |
| ||
Hi, if you mean icons in a window, like IE buttons or the buttons in blitz itself, (taken from example code in blitzplus folder samples\mak\simple_toolbar.bb ). window=CreateWindow( "ToolBar sample",0,0,640,480 ) ;toolbar items must be square! ;also, width and height parameters are currently ignored, ;as the toolbar auto-sizes to fit the image. toolbar=CreateToolBar( "toolbar.bmp",0,0,0,0,window ) ;set toolbar tips SetToolBarTips toolbar,"New,Open,Save,Close,Cut,Copy,Paste,Find,Run,Home,Back,Forward" panel=CreatePanel( 0,GadgetHeight(toolbar),ClientWidth(window),ClientHeight(window)-GadgetHeight(toolbar),window ) SetGadgetLayout panel,1,1,1,1 SetPanelColor panel,128,128,128 While WaitEvent()<>$803 If EventID()=$401 If EventSource()=toolbar Notify "ToolBar item "+EventData()+" hit!" EndIf EndIf Wend End |
| ||
I think he means a disk icon next to File|Save and so on. |
| ||
There is a way to put icons in those sorts of menus with API but i havent been using that long so i couldn't get it to work. Maybe some one more experienced with that sort of stuff would know how to set up a .decls for it. |
| ||
i havent attempted to do this using blitz+, the winapi SetMenuItemBitmaps() might be of use. the calls found in user32.dll kev |