VCClearAlertApp


Version:

1.2

Description:

Clears the hWnd from the messaging registry list.

Declaration:

 

C/C++

extern "C" void WINAPI VCClearAlertApp(short* iError, HWND hWnd);

Delphi

procedure VCClearAlertApp(var iError: Smallint; hWnd: Smallint); stdcall;

ActiveX/COM

Sub ClearAlertApp(ByVal hWnd As Long)

Parameters:

hWnd - the HWND of the object to receive messages from Visual CADD™.

Notes:

To initialize the 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 VCSetAlertApp code must specify which messages the application will receive. These can be added together to get multiple messages. For example, a VCSetAlertApp iCode of 12 would specify that the command line characters and abort messages would be sent to Visual CADD™. To handle these messages, the application must have specific code to handle a Windows message.

In Visual BASIC this is handled by supplying code in the mousedown event for the control for each mouse down message sent by Visual CADD™. Visual CADD™ is fairly intelligent about when to send this message and only sends 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 mousedown 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 and add code to the control for keypress. When the keypress code is activated by the message from Visual CADD™, use VCGetCmdStr to retrieve the last keypress from Visual CADD™. Once the keypress has been determined, the application can act accordingly 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 the application from the messaging registry.

See Also:

VCClearAlertApp, VCGetCmdStr, VCGetUserToolLBDown, VCSetAlertApp, VCSetUserTool