martin kaldma


Hi all!

I've a custom control as a list that I've created myself. Now I want to assign a ContextMenu to this control but the problem is that I am using the OnMouseDown event to handle clicks on the list items and perform some methods based on which item being clicked (calculated by the mouse coordinates). Now as I said I want to show a ContextMenu using the same method, or should I do it that way My question is: how do I assign a ContextMenu to my control in my case

Thanks,
Martin



Re: ContextMenu

Dan Elliott - MSFT


Martin,

If you are using PPC2003 or WM5 the context menu assigned to your control should be displayed automatically by tap-and-hold. This won't work on generic WinCE devices because WinCE doesn't implement tap-and-hold. In this case you could simulate tap-and-hold by determining the tick count between OnMouseDown and OnMouseUp, then react accordingly.

HTH
Dan