wLParam Property (ToolBar and MenuBar Controls)

Applies to TestComplete 15.63, last modified on April 22, 2024

Description

A specific LParam field is used to store application-defined button data. Use the wLParam property to retrieve the value of the LParam field for the specified item. For complete information on the control button, see the description of the TBBUTTONINFO structure in the MSDN library.

Declaration

TestObj.wLParam(Item, ByPosition)

Read-Only Property Integer
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Item [in]    Required    Variant    
ByPosition [in]    Optional    Boolean Default value: False   

Applies To

The property is applied to the following objects:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The property has the following parameters:

Item

Specifies the control item whose data you want to obtain. You can specify the item using its caption, identifier or position on the control (from 0). For more information, see the Remarks section at the bottom.

ByPosition

Specifies whether the Item parameter holds the identifier or position of the control item. For more information, see the Remarks section below. ByPosition is only used when Item holds an integer value. Otherwise, ByPosition is ignored.

Property Value

An integer LParam value that is associated with the given control button.

Remarks

You can specify the desired control’s item by assigning item’s caption, identifier or position on the control to the Item parameter. Therefore, if this parameter holds a string, TestComplete identifies the item by caption. When Item specifies the caption, you can use wildcards (* and ?) or regular expressions to mark variable parts of the caption. The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting. If Item holds an integer value, then TestComplete checks the ByPosition parameter to determine in what way to identify the item: if ByPosition is True, TestComplete treats the Item value as the item position; if ByPosition is False, TestComplete treats the Item value as an identifier.

If you use Python or DelphiScript, you should enclose the parameters of the wLParam property in square brackets: wLParam[Item, ByPosition].

Highlight search results