hi everyone.
i have a question:
i use TrackPopupMenuEx function to pop up a menu.the menu can pop up,but the menu cannot disappear when
i dont click the item of menu.But Accroading to the Programer's References,if the foutrh parameter is NULL,it means that if i click the area out of the menu bound the menu disappear.
Could you tell me where i am wrong!Thank you!
Posted on 2004-02-08 06:06:00 by Rey
Use these flags together:
TPM_RIGHTBUTTON or TPM_RETURNCMD or TPM_NONOTIFY
Posted on 2004-02-08 06:10:12 by Ultrano
Well, if you're trying to popup a menu on your tray icon, this may help:


invoke SetForegroundWindow, hWnd
invoke TrackPopupMenu, hSubMenu, 0, p.x, p.y, 0, hWnd, NULL
invoke PostMessage, hWnd, WM_NULL, 0, 0
Posted on 2004-02-08 14:30:01 by Morris
Hi :)
Just curious, why are you setting the target window to foreground, and posting a WM_NULL message? I've been using tray icon menus and never had to do that. :confused:
Posted on 2004-02-09 10:43:13 by QvasiModo
Hm, isn't that a trick to fix bugs with older windows versions? I think I saw it in MSDN somewhere.
Posted on 2004-02-09 10:51:15 by f0dder
Posted on 2004-02-09 13:36:32 by Morris
Thanks for the link :alright:
Posted on 2004-02-10 15:48:49 by QvasiModo
I think Morris is correct.
but coule you tell me the meaning of message "WM_NULL".
Thank you!
Posted on 2004-02-10 21:40:25 by Rey
Posted on 2004-02-11 01:52:55 by Morris
Thanks for the link.
I've already try,it really worked.Thank you again.
Posted on 2004-02-11 07:09:26 by Rey