I am adding a menu item by Shell extension in windows mobile.
The extension is for Menu in Context Card summary.
I add two menu items. One MenuItem is seperator and another is with a Command ID.
The seperator menu item just keeps adding every time the menu is rendered.
Any idea why is it happening ?
Code :
STDMETHODCALLTYPE MenuExtension::QueryContextMenu(
__in HMENU menuHandle,
__in UINT indexMenu,
__in UINT commandIdFirst,
__in UINT commandIdLast,
__in UINT flags
){
..
..
result = InsertMenuItem(menuHandle,
indexMenu,
commandIdFirst,
L"Extension");
result = ::InsertMenu(menuHandle, 0 ,
MF_GRAYED | MF_BYPOSITION,
commandIdFirst, L"Extension");
}