|
|
#1 |
|
Junior Member
Join Date: Jul 2003
Location: Germany
Posts: 40
|
Inserting Menu Items
Hi!
I try to insert a menu item into the playlist editors menu. So far it works, but the item is enserted into the first menu I select. If I first select the "File" menu, it appears in the file menu, when I first select the "Manage Playlist" menu, it appears there etc. I do catch the WM_INITMENUPOPUP message, but there seems to be no way to find out what menu has been selected, is it? Comments and Suggestions welcome :-) Sysinfo: winamp 5.05, winXP pro, delphi 7. Greetings Ganymed |
|
|
|
|
|
#2 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,210
|
look at GetMenuItemId(..) (is a Win32 api) and use that to check on what item is say at the start of the given popup menu
-daz |
|
|
|
|
|
#3 |
|
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
You must follow DrO's tip before Nullsoft gives us more info about their menus, like extending the IPC_GET_HMENU ipc to allow access to playlist editor menus as well.
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jun 2004
Posts: 3
|
Hej,
I need to know something, and i hope that you will know what i'm trying to ask,because i'm not writing in my language. I'm trying to insert "myPlugin" in to systemMenu.I have tried this way: CMenu* pSystemMenu=GetSystemMenu(FALSE) pSystemMenu->AppendMenu(MF_SEPARATOR); pSystemMenu->AppendMenu(MF_STRING,ID_MY_PLUGIN,_T("&myPlugin")); but it doesn't work.Can somebody help me.For now i'm using MFC,becase i haven't learn API yet,and it looks much easyer to me. Soory my english
|
|
|
|
|
|
#5 |
|
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
MFC mayham!
Looks like alesek is Swedish, though he wont tell us in his profile.
Du måste bara prova hårdare, kille! Solution: CMenu* pSystemMenu=::GetSystemMenu(plugin.hwndParent, FALSE); pSystemMenu->AppendMenu(MF_SEPARATOR); pSystemMenu->AppendMenu(MF_STRING,ID_MY_PLUGIN,_T("&myPlugin")); Use "::" in front to use the raw Win32 API version of GetSystemMenu(), and not the method of your CWnd/CDlg or whatever. Using ::GetSystemMenu() let you put in the handle of the window you want to get the the system menu from. It's very easy to forget, trust me I know
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jun 2004
Posts: 3
|
I've updated my profile
You were very wrong,well at list it starts on S I've tried your solution,but it returns me an error : cannot convert from 'struct HMENU__ *' to 'class CMenu *' I think i'll read some books to learn win32 programming better. PS: It doesn't wont to display my country.I'm from Slovenia Last edited by alesek; 7th October 2004 at 18:48. |
|
|
|
|
|
#7 |
|
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
Oh sorry do this:
code: |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|