Context Menu Extensions
-
Hi all, I have implemented Context Menu Extension on my namespace icon by implementing IContextMenu inteface. I have added 5 custom menus. This works fine for Win2k but I only see the first of this menus if I test it on Win XP. Can anyone tell me what is going wrong here? Thanks and Regards, Anil
-
Hi all, I have implemented Context Menu Extension on my namespace icon by implementing IContextMenu inteface. I have added 5 custom menus. This works fine for Win2k but I only see the first of this menus if I test it on Win XP. Can anyone tell me what is going wrong here? Thanks and Regards, Anil
Anil_vvs wrote:
This works fine for Win2k but I only see the first of this menus if I test it on Win XP. Can anyone tell me what is going wrong here?
Buddy, that impossible to tell witout seeing you source code!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Anil_vvs wrote:
This works fine for Win2k but I only see the first of this menus if I test it on Win XP. Can anyone tell me what is going wrong here?
Buddy, that impossible to tell witout seeing you source code!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
What I am doing is fairly straightforward.. inside the QueryContextMenu function of my implementation of IContextMenu interface I am passed the menu handle of the context menu thats displayed....I am calling InsertMenuItem with the passed menu handle and each of my menu Items.... I was wondering if there is a registry entry or something of that sort that has to be changed so that we get to see all the menus...
-
What I am doing is fairly straightforward.. inside the QueryContextMenu function of my implementation of IContextMenu interface I am passed the menu handle of the context menu thats displayed....I am calling InsertMenuItem with the passed menu handle and each of my menu Items.... I was wondering if there is a registry entry or something of that sort that has to be changed so that we get to see all the menus...
Post your code
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
Post your code
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
STDMETHODIMP MxSNEShellFolder::QueryContextMenu(HMENU hMenu, UINT uiIndexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) { AFX_MANAGE_STATE(AfxGetStaticModuleState()) m_hMenu = hMenu; m_idCmdFirst = uiIndexMenu; m_id = idCmdFirst; if (CMF_DEFAULTONLY & uFlags) return MAKE_HRESULT(SEVERITY_SUCCESS,FACILITY_NULL,0); int i = uiIndexMenu; MxSNECmdMgr cmdMgr; try { if(!cmdMgr.IsConnectedFromShell()) { MENUITEMINFO mii = { 0 }; mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; mii.wID = idCmdFirst + ID_CONNECT; mii.fType = MFT_STRING; mii.dwTypeData = _T("Menu1"); mii.fState = MFS_ENABLED; InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii); mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; mii.wID = idCmdFirst + ID_SEARCH; mii.fType = MFT_STRING; mii.dwTypeData = _T("Menu2"); mii.fState = MFS_DISABLED; InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii); mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; mii.wID = idCmdFirst + ID_CREATEUSINGTEMPLATE; mii.fType = MFT_STRING; mii.dwTypeData = _T("Menu3"); mii.fState = MFS_DISABLED; InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii); mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; mii.wID = idCmdFirst + ID_DISCONNECT; mii.fType = MFT_STRING; mii.dwTypeData = _T("Menu4"); mii.fState = MFS_DISABLED; InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii); mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; mii.wID = idCmdFirst + ID_ABOUT; mii.fType = MFT_STRING; mii.dwTypeData = _T("Menu5"); mii.fState = MFS_ENABLED; InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii); } catch(...) { } return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(i-uiIndexMenu)); }