I have created my own graphics component based on TcustomControl.
The control first draws a border area were textual information is drawn, it then sets a rectangular clipregion some percentage in from the full width and height of the control where graphics are then drawn.
The clip region is defined so that the drawn graphics do not encroach onto the border area and corrupt the text information.
At the end of the paint process, the clip region is deleted using
selectcliprgn(handle,0);
DeleteObject(HClip);
This all works hunky-dory, the problem is, that when I assign a context menu to the control (selected when the right mouse button is pressed), the menu only appears when the cursor is inside the region that was clipped. When I right click on the border area, the components parent controls context is menu is shown instead.
Any ideas why the clip region affects which context menu is displayed and how to stop it happening ?