OnMessage Method
UFT One 2022 and later: Following the discontinuance of the Silverlight development framework, UFT One no longer supports the Silverlight Add-in by default.
If you need to use and extend the Silverlight Add-in, contact OpenText Support.
Handles Windows messages.
This method is called during a recording session on any Windows message hooked by UFT according the filter returned by IRecord.GetWndMessageFilter.
Visual Basic (Declaration) | |
---|---|
Overridable Function OnMessage( _ ByVal src As DependencyObject, _ ByVal msg As Integer, _ ByVal wParam As Integer, _ ByVal lParam As Integer _ ) As RecordStatus |
C# | |
---|---|
virtual RecordStatus OnMessage( DependencyObject src, int msg, int wParam, int lParam ) |
Parameters
- src
- The control to which the Windows message is targeted. This can be either the control that is served by this custom server, one of its children, or any other control. Which messages are handled depends on the value returned by GetWndMessageFilter.
- msg
- The integer value of the Windows message sent. For example, WM_LBUTTONDOWN is 0x0201.
- wParam
- The wParam parameter passed with the Windows message.
- lParam
- The lParam parameter passed with the Windows message.
Return Value
A RecordStatus value, indicating whether the custom server handled the message, or whether this message needs to be passed on to other registered event handlers.