Alert Callbacks


There are numerous events in Visual CADD which can notify user code when then occur. These notifications can occur in three ways:

The following tables define the callbacks and their corresponding parameters.

Alert name

Mask value

ALERT_APP_UTOOL_MOUSEDOWN

0x00000001 (1)

ALERT_APP_UTOOL_MOUSEMOVE

0x00000002 (2)

ALERT_APP_UTOOL_ABORT

0x00000004 (4)

ALERT_APP_CMDLINE_CHAR

0x00000008 (8)

ALERT_APP_CLOSE

0x00000010 (16)

ALERT_APP_UTOOL_PENUP

0x00000020 (32)

ALERT_APP_WORLD_CLOSE

0x00000040 (64)

ALERT_APP_UTOOL_ERASERUBBER

0x00000080 (128)

ALERT_APP_TOOL_COMPLETE

0x00000100 (256)

ALERT_APP_UTOOL_INIT

0x00000200 (512)

ALERT_APP_UTOOL_TERMINATE

0x00000400 (1024)

ALERT_APP_FRAME_CLOSE

0x00000800 (2048)

ALERT_APP_FRAME_RESIZE

0x00001000 (4096)

ALERT_APP_ENTITY_ERASED

0x00002000 (8192)

ALERT_APP_ENTITY_SELECT_CHANGE

0x00004000 (16384)

ALERT_APP_ACTIVATE

0x00008000 (32768)

ALERT_APP_DEACTIVATE

0x00010000 (65536)

ALERT_APP_UTOOL_MOUSEUP

0x00020000 (131072)

ALERT_APP_WORLD_MOUSEMOVE

0x00040000 (262144)

ALERT_APP_WORLD_MOUSEDOWN

0x00080000 (524288)

ALERT_APP_WORLD_MOUSEUP

0x00100000 (1048576)

ALERT_APP_WORLD_END_REDRAW

0x00200000 (2097152)

ALERT_APP_WORLD_BEGIN_REDRAW

0x00400000 (4194304)

ALERT_APP_WORLD_BEGIN_PRINT

0x00800000 (8388608)

ALERT_APP_WORLD_END_PRINT

0x01000000 (16777216)

ALERT_APP_TOOL_START

0x02000000 (33554432)

ALERT_APP_TOOL_ABORT

0x04000000 (67108864)

ALERT_APP_NONE

0x80000000 (2147483648)

ALERT_APP_EX_PRE_TRANSLATE_GET_MESSAGE

0x00000001 (1)

ALERT_APP_EX_PRE_TRANSLATE_FRAME_MESSAGE

0x00000002 (2)

ALERT_APP_EX_PRE_TRANSLATE_DIALOG_MESSAGE

0x00000004 (4)

ALERT_APP_EX_USER_ALERT_MESSAGE

0x00000008 (8)

ALERT_APP_EX_DIALOG_OPEN_MESSAGE

0x00000010 (16)

ALERT_APP_EX_DIALOG_CLOSE_MESSAGE

0x00000020 (32)

ALERT_APP_EX_PRE_TRANSLATE_MDICHILD_MESSAGE

0x00000040 (64)

ALERT_APP_EX_WORLD_ACTIVATE

0x00000080 (128)

ALERT_APP_EX_WORLD_DEACTIVATE

0x00000100 (256)

ALERT_APP_EX_FILE_OPEN

0x00000200 (512)

ALERT_APP_EX_FILE_SAVE

0x00000400 (1024)

ALERT_APP_EX_FILE_DIALOG

0x00000800 (2048)

 

ALERT_APP_NONE

Version:

1.2

Description:

Use for code0 when no code0 alerts are desired

Mask:

Code0 - 0x80000000 (2147483648)

Message:

Alert callback:

Event:

Parameters:


Return:

Notes:

See Also:

ALERT_APP_UTOOL_INIT

Version:

1.2

Description:

Called when a user-tool, started by VCSetUserTool, is initializing.

Mask:

Code0 - 0x00000200 (512)

Message:

WM_CHAR - 0xFB (251)

Alert callback:

void WINAPI YourAlertName_Init(WPARAM wParam, LPARAM lParam)

Event:

Init(long wParam, long lParam)

Parameters:

wParam - 0xFB (251)
lParam - Tool ID

Return:

None

Notes:

This alert will be followed by a ALERT_APP_TOOL_START when the tool starts.

See Also:

ALERT_APP_UTOOL_TERMINATE

Version:

1.2

Description:

Called when a user-tool, started by VCSetUserTool, is terminating.

Mask:

Code0 - 0x00000400 (1024)

Message:

WM_CHAR - 0xFA (250)

Alert callback:

void WINAPI YourAlertName_Terminate(WPARAM wParam, LPARAM lParam)

Event:

Terminate(long wParam, long lParam)

Parameters:

wParam - 0xFA (250)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_UTOOL_ABORT

Version:

1.2

Description:

Called when a user-tool, started by VCSetUserTool, is aborting.

Mask:

Code0 - 0x00000004 (4)

Message:

WM_CHAR - 0x1B (27)

Alert callback:

void WINAPI YourAlertName_Abort(WPARAM wParam, LPARAM lParam)

Event:

Abort(long wParam, long lParam)

Parameters:

wParam - 0x1B (27)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_UTOOL_MOUSEDOWN

Version:

1.2

Description:

Called when a user-tool, started by VCSetUserTool, receives mouse-click input from the user.

Mask:

Code0 - 0x00000001 (1)

Message:

WM_LBUTTONDOWN

Alert callback:

void WINAPI YourAlertName_MouseDown(WPARAM wParam, LPARAM lParam)

Event:

MouseDown(long wParam, long lParam)

Parameters:

wParam - 0
lParam - 0

Return:

None

Notes:

Points entered by the user from the keyboard are translated into the equivalent mouse-click and sent as a mouse-down. Refer to API Help VCGetUserToolLBDown topic for mousedown location.

See Also:

ALERT_APP_UTOOL_MOUSEMOVE

Version:

1.2

Description:

Called when a user-tool, started by VCSetUserTool, receives mousemove input from the user.

Mask:

Code0 - 0x00000002 (2)

Message:

WM_MOUSEMOVE

Alert callback:

void WINAPI YourAlertName_MouseMove(WPARAM wParam, LPARAM lParam)

Event:

MouseMove(long wParam, long lParam)

Parameters:

wParam - 0
lParam - 0

Return:

None

Notes:

Refer to API Help file for VCGetUserToolMouseMove for mousemove location.

See Also:

ALERT_APP_UTOOL_MOUSEUP

Version:

2.0

Description:

Called when a user-tool, started by VCSetUserTool, receives mouseup input from the user.

Mask:

Code0 - 0x00020000 (131072)

Message:

WM_LBUTTONUP

Alert callback:

void WINAPI YourAlertName_MouseUp(WPARAM wParam, LPARAM lParam)

Event:

MouseUp(long wParam, long lParam)

Parameters:

wParam - 0x0 (0)
lParam - 0

Return:

None

Notes:

Refer to API Help file for VCGetUserToolLBUp for mouseup location.

See Also:

ALERT_APP_UTOOL_PENUP

Version:

1.2

Description:

Called when a user-tool, started by VCSetUserTool, receives a PenUp command from the user.

Mask:

Code0 - 0x00000020 (32)

Message:

WM_CHAR - 0xFC (252)

Alert callback:

void WINAPI YourAlertName_PenUp(WPARAM wParam, LPARAM lParam)

Event:

PenUp(long wParam, long lParam)

Parameters:

wParam - 0xFC (252)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_UTOOL_ERASERUBBER

Version:

1.2

Description:

Called when a user-tool, started by VCSetUserTool, needs to erase any possible rubberband from the screen.

Mask:

Code0 - 0x00000080 (128)

Message:

WM_CHAR - 0xFF (255)

Alert callback:

void WINAPI YourAlertName_EraseRubber(WPARAM wParam, LPARAM lParam)

Event:

EraseRubber(long wParam, long lParam)

Parameters:

wParam - 0xFF (255)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_TOOL_START

Version:

3.0

Description:

Called when a tool is starting.

Mask:

Code0 - 0x02000000 (33554432)

Message:

WM_CHAR - 0xEC (236)

Alert callback:

void WINAPI YourAlertName_ToolStart(WPARAM wParam, LPARAM lParam)

Event:

ToolStart(long wParam, long lParam)

Parameters:

wParam - 0xEC (236)
lParam - LOWORD is tool ID, HIWORD is tool type

Return:

None

Notes:

See Also:

Tool types, Tool start sequence

ALERT_APP_TOOL_COMPLETE

Version:

1.2

Description:

Called when a tool is completing.

Mask:

Code0 - 0x00000100 (256)

Message:

WM_CHAR - 0xFE (254)

Alert callback:

void WINAPI YourAlertName_ToolComplete(WPARAM wParam, LPARAM lParam)

Event:

ToolComplete(long wParam, long lParam)

Parameters:

wParam - 0xFE (254)
lParam - LOWORD is Tool ID, HIWORD is Tool Type

Return:

None

Notes:

See ToolStart for discussion of when this alert is generated.

See Also:

ALERT_APP_TOOL_ABORT

Version:

3.0

Description:

Called when a tool is aborting.

Mask:

Code0 - 0x04000000 (67108864)

Message:

WM_CHAR - 0xEB (235)

Alert callback:

void WINAPI YourAlertName_ToolAbort(WPARAM wParam, LPARAM lParam)

Event:

ToolAbort(long wParam, long lParam)

Parameters:

wParam - 0xEB (235)
lParam - LOWORD is tool ID, HIWORD is tool type

Return:

None

Notes:

See Also:

Tool types, Tool start sequence

ALERT_APP_WORLD_MOUSEDOWN

Version:

2.0.4

Description:

Called when the user mouse-clicks in the drawing.

Mask:

Code0 - 0x00080000 (524288)

Message:

WM_CHAR - 0xF2 (242)

Alert callback:

void WINAPI YourAlertName_WorldMouseDown(WPARAM wParam, LPARAM lParam)

Event:

WorldMouseDown(long wParam, long lParam)

Parameters:

wParam - 0xF2 (242)
lParam - 0

Return:

None

Notes:

This callback will receive all mousedowns, compared to the callback for user-tools which receives only mousedowns for that user-tool. Refer to API Help file for VCGetCurrentPoint for mousedown location.

See Also:

ALERT_APP_WORLD_MOUSEUP

Version:

2.0.4

Description:

Called when the user mouseups in the drawing.

Mask:

Code0 - 0x00100000 (1048576)

Message:

WM_CHAR - 0xF1 (241)

Alert callback:

void WINAPI YourAlertName_WorldMouseUp(WPARAM wParam, LPARAM lParam)

Event:

WorldMouseUp(long wParam, long lParam)

Parameters:

wParam - 0xF1 (241)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_WORLD_MOUSEMOVE

Version:

2.0.4

Description:

Called when the user mousemoves in the drawing.

Mask:

Code0 - 0x00040000 (262144)

Message:

WM_CHAR - 0xF3 (243)

Alert callback:

void WINAPI YourAlertName_WorldMouseMove(WPARAM wParam, LPARAM lParam)

Event:

WorldMouseMove(long wParam, long lParam)

Parameters:

wParam - 0xF3 (243)
lParam - 0

Return:

None

Notes:

Refer to API Help file for VCGetCurrentPoint for mousemove location.

See Also:

ALERT_APP_CMDLINE_CHAR

Version:

1.2

Description:

Called when the user enters command line input from the keyboard.

Mask:

Code0 - 0x00000008 (8)

Message:

WM_CHAR

Alert callback:

void WINAPI YourAlertName_Char(WPARAM wParam, LPARAM lParam)

Event:

Char(long wParam, long lParam)

Parameters:

wParam - ANSI character code
lParam - 0

Return:

None

Notes:

Since the WM_CHAR message is also used for other alert messages, this alert should be used with caution if character values greater than 0X7F (127) may be encountered.

See Also:

ALERT_APP_ENTITY_ERASED

Version:

2.0

Description:

Called when an entity is erased.

Mask:

Code0 - 0x00002000 (8192)

Message:

WM_CHAR - 0xF7 (247)

Alert callback:

void WINAPI YourAlertName_EntityErased(WPARAM wParam, LPARAM lParam)

Event:

EntityErased(long wParam, long lParam)

Parameters:

wParam - 0xF7 (247)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_ENTITY_SELECT_CHANGE

Version:

2.0

Description:

Called when an entity's selection state changes.

Mask:

Code0 - 0x00004000 (16384)

Message:

WM_CHAR - 0xF6 (246)

Alert callback:

void WINAPI YourAlertName_EntitySelectChange(WPARAM wParam, LPARAM lParam)

Event:

EntitySelectChange(long wParam, long lParam)

Parameters:

wParam - 0xF6 (246)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_WORLD_BEGIN_REDRAW

Version:

2.0.4

Description:

Called when a drawing begins redrawing.

Mask:

Code0 - 0x00400000 (4194304)

Message:

WM_CHAR - 0xEF (239)

Alert callback:

void WINAPI YourAlertName_WorldBeginRedraw(WPARAM wParam, LPARAM lParam)

Event:

WorldBeginRedraw(long wParam, long lParam)

Parameters:

wParam - 0xEF (239)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_WORLD_END_REDRAW

Version:

2.0.4

Description:

Called when a drawing completes redrawing.

Mask:

Code0 - 0x00200000 (2097152)

Message:

WM_CHAR - 0xF0 (240)

Alert callback:

void WINAPI YourAlertName_WorldEndRedraw(WPARAM wParam, LPARAM lParam)

Event:

WorldEndRedraw(long wParam, long lParam)

Parameters:

wParam - 0xF0 (240)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_WORLD_BEGIN_PRINT

Version:

2.0.4

Description:

Called when a drawing begins printing.

Mask:

Code0 - 0x00800000 (8388608)

Message:

WM_CHAR - 0xEE (238)

Alert callback:

void WINAPI YourAlertName_WorldBeginPrint(WPARAM wParam, LPARAM lParam)

Event:

WorldBeginPrint(long wParam, long lParam)

Parameters:

wParam - 0xEE (238)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_WORLD_END_PRINT

Version:

2.0.4

Description:

Called when a drawing completes printing.

Mask:

Code0 - 0x01000000 (16777216)

Message:

WM_CHAR - 0xED (237)

Alert callback:

void WINAPI YourAlertName_WorldEndPrint(WPARAM wParam, LPARAM lParam)

Event:

WorldEndPrint(long wParam, long lParam)

Parameters:

wParam - 0xED (237)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_EX_DIALOG_OPEN_MESSAGE

Version:

3.0

Description:

Called when a dialog has opened.

Mask:

Code1 - 0x00000010 (16)

Message:

WM_CHAR - 0xE5 (229)

Alert callback:

void WINAPI YourAlertName_DialogOpen(WPARAM wParam, LPARAM lParam)

Event:

DialogOpen(long wParam, long lParam)

Parameters:

wParam - 0xE5 (229)
lParam - Dialog ID

Return:

None

Notes:

This message is posted with PostMessage

See Also:

ALERT_APP_EX_DIALOG_CLOSE_MESSAGE

Version:

3.0

Description:

Called when a dialog has closed.

Mask:

Code1 - 0x00000020 (32)

Message:

WM_CHAR - 0xE4 (228)

Alert callback:

void WINAPI YourAlertName_DialogClose(WPARAM wParam, LPARAM lParam)

Event:

DialogClose(long wParam, long lParam)

Parameters:

wParam - 0xE4 (228)
lParam - Dialog ID

Return:

None

Notes:

This message is posted with PostMessage

See Also:

ALERT_APP_CLOSE

Version:

1.2

Description:

Called when the VCADD application is closing.

Mask:

Code0 - 0x00000010 (16)

Message:

WM_CLOSE

Alert callback:

void WINAPI YourAlertName_AppClose(WPARAM wParam, LPARAM lParam)

Event:

AppClose(long wParam, long lParam)

Parameters:

wParam - 0x0 (0)
lParam - 0

Return:

None

Notes:

This is equivalent to ALERT_APP_FRAME_CLOSE

See Also:

ALERT_APP_WORLD_CLOSE

Version:

1.2

Description:

Called when a VCADD drawing is closing.

Mask:

Code0 - 0x00000040 (64)

Message:

WM_CHAR - 0xFD (253)

Alert callback:

void WINAPI YourAlertName_DrawingClose(WPARAM wParam, LPARAM lParam)

Event:

DrawingClose(long wParam, long lParam)

Parameters:

wParam - 0xFD (253)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_FRAME_CLOSE

Version:

2.0

Description:

Called when the main VCADD frame window is closing.

Mask:

Code0 - 0x00000800 (2048)

Message:

WM_CHAR - 0xF9 (249)

Alert callback:

void WINAPI YourAlertName_FrameClose(WPARAM wParam, LPARAM lParam)

Event:

FrameClose(long wParam, long lParam)

Parameters:

wParam - 0xF9 (249)
lParam - 0

Return:

None

Notes:

This is equivalent to ALERT_APP_CLOSE

See Also:

ALERT_APP_FRAME_RESIZE

Version:

2.0

Description:

Called when the main VCADD frame window is resizing.

Mask:

Code0 - 0x00001000 (4096)

Message:

WM_CHAR - 0xF8 (248)

Alert callback:

void WINAPI YourAlertName_FrameResize(WPARAM wParam, LPARAM lParam)

Event:

FrameResize(long wParam, long lParam)

Parameters:

wParam - 0xF8 (248)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_ACTIVATE

Version:

2.0

Description:

Called when the VCADD application is being activated.

Mask:

Code0 - 0x00008000 (32768)

Message:

WM_CHAR - 0xF5 (245)

Alert callback:

void WINAPI YourAlertName_Activate(WPARAM wParam, LPARAM lParam)

Event:

Activate(long wParam, long lParam)

Parameters:

wParam - 0xF5 (245)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_DEACTIVATE

Version:

2.0

Description:

Called when the VCADD application is being deactivated.

Mask:

Code0 - 0x00010000 (65536)

Message:

WM_CHAR - 0xF4 (244)

Alert callback:

void WINAPI YourAlertName_DeActivate(WPARAM wParam, LPARAM lParam)

Event:

DeActivate(long wParam, long lParam)

Parameters:

wParam - 0xF4 (244)
lParam - 0

Return:

None

Notes:

See Also:

ALERT_APP_EX_WORLD_ACTIVATE

Version:

5.0

Description:

Called just after a world is activated.

Mask:

Code1 - 0x00000080 (128)

Message:

WM_CHAR - 0xE2 (226)

Alert callback:

void WINAPI YourAlertName_WorldActivate(WPARAM wParam, LPARAM lParam)

Event:

WorldActivate(long wParam, long lParam)

Parameters:

wParam - 0xE2 (226)
lParam - HWND of the world just activated

Return:

None

Notes:

See Also:

ALERT_APP_EX_WORLD_DEACTIVATE

Version:

5.0

Description:

Called just before a world is deactivated

Mask:

Code1 - 0x00000100 (256)

Message:

WM_CHAR - 0xE1 (225)

Alert callback:

void WINAPI YourAlertName_WorldDeActivate(WPARAM wParam, LPARAM lParam)

Event:

WorldDeActivate(long wParam, long lParam)

Parameters:

wParam - 0xE1 (225)
lParam - HWND of the world to be deactivated

Return:

None

Notes:

See Also:

ALERT_APP_EX_FILE_OPEN

Version:

5.0

Description:

Called when a file is being opened

Mask:

Code1 - 0x00000200 (512)

Message:

WM_CHAR - 0xE0 (224)

Alert callback:

void WINAPI YourAlertName_FileOpen(WPARAM wParam, LPARAM lParam)

Event:

FileOpen(long wParam, long lParam)

Parameters:

wParam - 0xE0 (224)
lParam - Flag indicating the file's opening state

Return:

None

Notes:

See the API help file or VCtypes32.h for flag values

See Also:

ALERT_APP_EX_FILE_SAVE

Version:

5.0

Description:

Called when a file is being saved

Mask:

Code1 - 0x00000400 (1024)

Message:

WM_CHAR - 0xDF (223)

Alert callback:

void WINAPI YourAlertName_FileSave(WPARAM wParam, LPARAM lParam)

Event:

FileSave(long wParam, long lParam)

Parameters:

wParam - 0xDF (223)
lParam - Flag indicating the file's saving state

Return:

None

Notes:

See the API help file or VCtypes32.h for flag values

See Also:

ALERT_APP_EX_USER_ALERT_MESSAGE

Version:

3.0

Description:

Called when VCADD receives a user alert sent by the user's application

Mask:

Code1 - 0x00000008 (8)

Message:

WM_CHAR - 0xE6 (230)

Alert callback:

void WINAPI YourAlertName_UserAlert(WPARAM wParam, LPARAM lParam)

Event:

UserAlert(long wParam, long lParam)

Parameters:

wParam - 0xE6 (230)
lParam - The LParam value included with the posted VCM_USER_ALERT message.

Return:

None

Notes:

This is analogous to WM_USER messages and allows the user to send and process user-defined messages.
User posts a user alert to VCADD with the following:
PostMessage((HWND)VCGethWndFrame(), WM_COMMAND, VCM_USER_ALERT, lParam);
Note: VCM_USER_ALERT is defined as 2801 in VCTypes32.h This message is posted with PostMessage.

See Also:

ALERT_APP_EX_PRE_TRANSLATE_GET_MESSAGE

Version:

3.0

Description:

Called when VCADD gets a PostMessage message from the Windows message queue.

Mask:

Code1 - 0x00000001 (1)

Message:

Pass thru

Alert callback:

BOOL WINAPI YourAlertName_PreTranslateGetMessage(AlertMSG* pMsg)

Event:

PreTranslateGetMessage(long* hWnd, long* uMsg, long* wParam, long* lParam, long* Reserved, long* lResult, long* lResultFlag) As Integer

Parameters:

pMsg - pointer to message structure, separate member parameters for event

Return:

Return TRUE to prevent VCADD from processing the message.

Notes:

See Also:

ALERT_APP_EX_PRE_TRANSLATE_FRAME_MESSAGE

Version:

3.0

Description:

Called when VCADD handles a Windows SendMessage.

Mask:

Code1 - 0x00000002 (2)

Message:

Pass thru

Alert callback:

BOOL WINAPI YourAlertName_PreTranslateFrameMessage(AlertMSG* pMsg)

Event:

PreTranslateFrameMessage(long* hWnd, long* uMsg, long* wParam, long* lParam, long* Reserved, long* lResult, long* lResultFlag) As Integer

Parameters:

pMsg - pointer to message structure, separate member parameters for event

Return:

Return TRUE to prevent VCADD from processing the message.

Notes:

To have VCADD return a specific value for the message, set lResult to the desired value and lResultFlag to TRUE, otherwise VCADD will return TRUE.

See Also:

ALERT_APP_EX_PRE_TRANSLATE_DIALOG_MESSAGE

Version:

3.0

Description:

Called when VCADD processes dialog box messages.

Mask:

Code1 - 0x00000004 (4)

Message:

Pass thru

Alert callback:

BOOL WINAPI YourAlertName_PreTranslateDialogMessage(AlertMSG* pMsg)

Event:

PreTranslateDialogMessage(long* hWnd, long* uMsg, long* wParam, long* lParam, long* Reserved, long* lResult, long* lResultFlag) As Integer

Parameters:

pMsg - pointer to message structure, separate member parameters for event

Return:

Return TRUE to prevent VCADD from processing the message.

Notes:

To have VCADD return a specific value for the message, set lResult to the desired value and lResultFlag to TRUE, otherwise VCADD will return TRUE.

See Also:

ALERT_APP_EX_PRE_TRANSLATE_MDICHILD_MESSAGE

Version:

4.0

Description:

Called when VCADD processes MDI child messages.

Mask:

Code1 - 0x00000040 (64)

Message:

Pass thru

Alert callback:

BOOL WINAPI YourAlertName_PreTranslateMdiChildMessage(AlertMSG* pMsg)

Event:

PreTranslateMdiChildMessage(long* hWnd, long* uMsg, long* wParam, long* lParam, long* Reserved, long* lResult, long* lResultFlag) As Integer

Parameters:

pMsg - pointer to message structure, separate member parameters for event

Return:

Return TRUE to prevent VCADD from processing the message.

Notes:

To have VCADD return a specific value for the message, set lResult to the desired value and lResultFlag to TRUE, otherwise VCADD will return TRUE.

See Also:

ALERT_APP_EX_FILE_DIALOG

Version:

9.0.1

Description:

Called when a VCADD file dialog handles events.

Mask:

Code1 - 0x00000800 (2048)

Message:

WM_COPYDATA

Alert callback:

BOOL WINAPI YourAlertName_FileDialog(AlertMSG* pMsg)

Event:

FileDialog(long* hWnd, long* uMsg, long* wParam, long* lParam, long* Reserved, long* lResult, long* lResultFlag) As Integer

Parameters:

pMsg - pointer to message structure, separate member parameters for event

Return:

Return 0 to ignore the event. See specific events below for other values.

Notes:

The lParam member of the pMSG structure points to a COPYDATASTRUCT where the lower BYTE of the dwData member is an event code and the lpData member is a pointer to a string with the information related to the event. The hWnd parameter is the window handle of the file dialog.
For the ActiveX/COM Event, the lParam is a BSTR.

CodeEventDescriptionString ValueReturn
1Type ChangedThe file type filter has been changedThe new filterIgnored
2Folder ChangingThe folder is about to be changedThe new folderTRUE to reject the change
3Folder ChangedThe folder has changedThe new folderIgnored
4OverwriteThe new file will overwrite an existing fileThe selected filename TRUE to suppress the warning dialog
Set lResult to 1 accept the file and 2 to reject it.
lResult defaults to 1.
5Filename OKThe OK button has been clickedThe selected filename(s)
multiple names separated by |
TRUE to reject the name(s)

See Also: