VCGetCmdStr
VCSetCmdStr


Version:

1.2

Description:

Retrieves the last command line input.

Declaration:

 

C/C++

extern "C" short WINAPI VCGetCmdStr(short* iError, char* pS);
extern "C" void WINAPI VCSetCmdStr(short* iError, char* pS);

Delphi

function VCGetCmdStr(var iError: Smallint; pS: PAnsiChar):Smallint; stdcall;
procedure VCSetCmdStr(var iError: Smallint; pS: PAnsiChar); stdcall;

ActiveX/COM

Function GetCmdStr() As String
Sub SetCmdStr(ByVal pS As String)

Parameters:

pS - the last command or coordinate entry processed by the Visual CADD™ command parser.

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 the code must specify which messages the application will receive. These can be added together to get multiple messages. For example, an iCode of 12 would specify that the command line characters and abort messages would be sent to the external application. To handle these messages, the application must have code to handle a Windows message being sent whose hWnd is registered with VCSetAlertApp. In Visual BASIC, this is handled 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 only) and add code to the external application for key press. When the key press code is activated, use VCGetCmdStr to retrieve the last command string from Visual CADD™. Once the key press has been determined, the application can act according to process the information or send it back for Visual CADD™ to use with VCSetCmdStr. Once the application has completed the messaging, use VCClearAlertApp to remove the application from the messaging registry. For more information on iCode, please see VCSetAlertApp.

See Also:

VCClearAlertApp, VCGetUserToolLBDown, VCSetAlertApp, VCLButtonDown