OnMessage Method (IRecord)
The hooked Windows message.
Handles window messages.
Remarks

This method is called on any window message hooked by UFT according the filter returned by GetWndMessageFilter. The default implementation is empty and returns RECORD_HANDLED, which prevents UFT from handling the message.

The return value indicates to UFT what action to take on the message.

Implement this method to handle the messages intercepted by your Custom Server, or to return a value other than RECORD_HANDLED so that UFT will handle the message.

Custom servers running in the AUT context do not override this method because they cannot hook window messages.

Syntax
'Declaration
 
Function OnMessage( _
   ByRef tMsg As System.Windows.Forms.Message _
) As RecordStatus
RecordStatus OnMessage( 
   ref System.Windows.Forms.Message tMsg
)

Parameters

tMsg
The hooked Windows message.

Return Value

A value of RecordStatus.