Dialog editor: systray icon+menu (like menu-editor)

What new features you would like to see in next QM version?

Dialog editor: systray icon+menu (like menu-editor)

Postby r0n on Wed Sep 09, 2015 6:04 pm

This is a luxury request but might be handy?

The dialog editor has a very handy menu-editor which allows to add a menu in your dialog.
Is it possible to have an systray-icon-menu editor which allows to add a systray icon in systray + left/right click menu.
(Just like the menu-editor?)
r0n
Active Member
 
Posts: 490
Joined: Tue Jul 24, 2012 5:47 am

Re: Dialog editor: systray icon+menu (like menu-editor)

Postby Gintaras on Wed Sep 09, 2015 6:54 pm

Macro Tray icon menu     ?
Tray t.AddIcon("$qm$\copy.ico" "tt" 0 &sub.TrayCallback)
mes "test tray icon menu"


#sub TrayCallback
function Tray&x message

;Callback function for Tray.AddIcon.
;Called for each received message - when tray icon clicked, or mouse moved.
;
;x - reference to this object.
;message - mouse message (WM_MOUSEMOVE, WM_LBUTTONDOWN, etc).


;OutWinMsg message 0 0 ;;uncomment to see received messages

sel message
,case WM_LBUTTONUP
,;out "left click"
,
,case WM_RBUTTONUP
,;out "right click"
,sub.OnTrayIconRightClick x.param
,
,case WM_MBUTTONUP
,;out "middle click"
,


#sub OnTrayIconRightClick
function param

;created and can be edited with the Menu Editor

str md=
;BEGIN MENU
;>&File
;,&Open :501 0x0 0x0 Co
;,&Save :502 0x0 0x0 Cs
;,>Submenu
;,,Item1 :551
;,,Item2 :552
;,,<
;,-
;,E&xit :2
;,<
;>&Edit
;,Cu&t :601
;,&Copy :602
;,&Paste :603
;,<
;>&Help
;,&About :901
;,<
;END MENU

int i=ShowMenu(md); out i

Gintaras
Site Admin
 
Posts: 10328
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: Dialog editor: systray icon+menu (like menu-editor)

Postby r0n on Wed Sep 09, 2015 10:37 pm

WOW THANK YOU!
r0n
Active Member
 
Posts: 490
Joined: Tue Jul 24, 2012 5:47 am


Return to Wish List

Who is online

Users browsing this forum: No registered users and 1 guest