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.
 
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.
 
Back
Top