Adding context menu if user clicks on hyperlink in reading pane orinspector

  • Thread starter Thread starter vidishasharma
  • Start date Start date
V

vidishasharma

Hi,

I want to add a context menu when user right clicks on hyperlink in
reading pane or inspector window.

Please guide me how I have to this. Ken has suggested "detect that
you're over a hyperlink somehow and trap the mouse right-click."
however I want to be sure if this can be done using outlook API's or
this need some win32 api's


Regards.
 
There is nothing in the OOM that will help you with this at all.
 
Hi Ken can you guide me how I can achieve this.

I added the following code

private IntPtr ReadingPaneProc(IntPtr hWnd, int msg, IntPtr wParam,
IntPtr lParam)
{
System.Windows.Forms.Message m =
System.Windows.Forms.Message.Create(hWnd, msg, wParam,
lParam);
switch (m.Msg)
{
case WM_SETCURSOR:

cursorvalue =
GetCursor().ToInt32() ;



if ((int)SystemIcons.IDI_HAND == cursorvalue)
{


MessageBox.Show(cursorvalue.ToString() + "on
hyperlink");
}


break;


case WM_PAINT:

DefReadingPaneProc(ref m);

break;

default:
DefReadingPaneProc(ref m);
break;
}
return m.Result;
}

However I never get value for IDI_HAND

where value of IDI_HAND is int IDI_HAND = 32513

Do you have any idea.
 
I don't have a clue. I've never worked with that sort of thing in managed
code, only in unmanaged code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top