Version: |
2.0.4 |
Description: |
Enables messages to be sent back to an external application when the specified Visual CADD™ event has occurred. This call is the same as VCSetAlertApp, except it can handle a larger range of alert codes. |
Declaration: |
|
C/C++ |
extern "C" void WINAPI VCSetAlertAppEx(short* iError, long hWnd, long iCode0, long iCode1); |
Delphi |
procedure VCSetAlertAppEx (var iError: Smallint; hWnd: Longint; iCode0: Longint; iCode1: Longint); stdcall; |
ActiveX/COM |
Sub SetAlertAppEx(ByVal hWnd As Long, ByVal iCode0 As Long, ByVal iCode1 As Long) |
Parameters: |
iError - hWnd - the window handle
of the window object which will receive the messages from Visual CADD™. iCode1 - Specifies the extended messages the external application wants to be notified of. This parameter can be a combination of the iCode1 flags specified in Alert Callbacks. If you do not want to be notified of any iCode1 events, set the iCode1 flag to 0. |
Notes: |
To initialize Windows messaging between Visual CADD™ and an external application, the window handle of some control or object must be sent to Visual CADD™ using VCSetAlertAppEx. When registering the handle a code must also be included which specifies which messages an application will receive. These can be ORed or added together to get multiple messages. For example iCode0 of (ALERT_APP_UTOOL_ABORT | ALERT_APP_UTOOL_MOUSEDOWN) would specify that the command line characters and abort messages would be sent. To handle these messages, an application must have code specifically to handle a Windows message sent to the control whose handle is registered with VCSetAlertAppEx. In Visual BASIC, this is handled by supplying code in the mousedown 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 will 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 mousedown event. To retrieve the point the user selected in the drawing area, use VCGetUserToolLBDown which sets its Point2D parameter to the last point picked. Once the application is finished with the messaging, use VCClearAlertApp to remove the application from the messaging registry. |
See Also: |
VCSetAlertApp, VCSetAlertAppDll, VCSetAlertAppDllEx, SetAlertEvent, VCClearAlertApp, VCClearAlertAppDll |