VCGetUserToolLBDown


Version:

1.2

Description:

Retrieves the last point selected within the drawing area. Used with VCSetAlertApp.

Declaration:

 

C/C++

extern "C" void WINAPI VCGetUserToolLBDown(short* iError, Point2D* dpP);

Delphi

procedure VCGetUserToolLBDown(var iError: Smallint; var dpP: Point2D); stdcall;

ActiveX/COM

Function GetUserToolLBDown() As IVCPoint2D

Parameters:

dpP - set to reflect the last drawing coordinates picked by the user.

Notes:

To initialize Windows messaging between Visual CADD™ and an external application, the hWnd of some control or object must be sent to Visual CADD™ using VCSetAlertApp. When registering the hWnd a code must also be included which specifies which messages an application will receive. These can be added together to get multiple messages. For example iCode of 12 would specify that the command line characters and abort messages would be sent. To handle these messages, an application code must have code specifically to handle a Windows message sent to the control whose hWnd is registered with VCSetAlertApp.

In Visual BASIC, handle this by supplying code in the mouse down event for the control specified for each mouse down message sent by Visual CADD™. Visual CADD™ is fairly intelligent about when to send this message and only send the message when a drawing point has been selected. This means that the user can issue snaps or use tracking without invoking the application code for the mouse down event. To retrieve the point the user selected in the drawing area, use VCGetUserToolLBDown which sets a Point2D of the last point picked. When trapping the user input, register the control with an iCode of either 0 (all messages) or 8 (mouse down messages) and add code to the control for key press.

When the key press code is activated by the message from Visual CADD™, use VCGetCmdStr to retrieve the last key press from Visual CADD™. Once the key press has been determined through code can act according to process the information or send it back for Visual CADD™ to use with VCSetCmdStr. Once the application has completed with the messaging, use VCClearAlertApp to remove an application from the messaging registry.

See Also:

VCSetAlertApp, VCSetCmdStr, VCGetCmdStr, VCSetAlertApp