Sign in to follow this  
Followers 0
zero_divide_1

Contacts Menu Integration Problem

2 posts in this topic

Hello all,

I'm currently in a quandry with a plugin I'm currently writing. I'm using Visual Studio 2005, and I've been developing a plugin in C++ based on the MedicalHistory example provided with the WM5 PPC SDK. Unfortunately, I've been running into a bit of a problem with the plugin I've written and the MedicalHistory plugin, as well as a few other plugins. What is happening is whenever I have both plugins registered, I see both show up in the context menu of the Contacts application, so that part of it is working, but then when I click on them, depending on the order I installed them, either the MedicalHistory plugin will load up on both menu items, or my plugin will load up on each one. In other words, each menu item should correspond to a different plugin (Medical History or my plugin), but they both load the same plugin when you click either one. Here is the code that I have implemented in my plugin (I've noticed this problem with other plugins I have installed on my PPC also) to add it to the menu:

HRESULT STDMETHODCALLTYPE ICFMenuExtension::QueryContextMenu(HMENU hmenu,

	UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)

{

	HRESULT hr = S_OK;

	BOOL bRet;


	m_idMenu = idCmdFirst+1;


	bRet = InsertMenu(hmenu, indexMenu, MF_BYPOSITION | MF_STRING, m_idMenu, c_szICFMenu);

	CBR(bRet);


Error:

	return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 1);

Mind you, this is my first time writing a C++ app for WM5 and the first time using COM for a context menu extension. What am I doing wrong, if anything? Thanks in advance for all your help! :)

0

Share this post


Link to post
Share on other sites
but they both load the same plugin when you click either one. Here is the code that I have implemented in my plugin (I've noticed this problem with other plugins I have installed on my PPC also) to add it to the menu

Your code seems correct not to mention that you have the sample...:)

Check your registry entries for the menu extension entries and make sure that you use a different GUID for the 2 menu extension entries.

Cheers,

Raul Tinca

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.