When one implements a VS menu-command plug-in and uses either:
1) GetPt or some of its variants
2) CallTool
... pressing ESC, any other key that activates different than the active tool or activating another tool by clicking with the mouse button on it in the given tool palette, causes the menu-command to loose its execution context. The execution of the menu-command is interrupted at the point of the GetPt/GetPt3D/GetPtL/GetPtL3D/CallTool call. CallTool's documentation states that:
Probably this is valid only for tool plug-ins.
Here's a sample script:
PROCEDURE Main;
VAR
pt: POINT;
BEGIN
AlrtDialog( 'Pick a location...' );
GetPt( pt.x, pt.y );
{any code starting from this point does not get executed if ESC or another tool chaning key is pressed or the active tool is changed via a mouse click}
AlrtDialog( concat( 'Location: (', Num2Str( 3, pt.x ), ', ', Num2Str( 3, pt.y ), ')' ) );
END;
RUN(Main);
Obviously, this is a bug. Is there a way/workaround to go back to menu-command's execution context after changing the desired tool with another one?