Message.GetLParam(Type) 方法

定义

获取 LParam 值,并将其转换为对象。Gets the LParam value and converts the value to an object.

public:
 System::Object ^ GetLParam(Type ^ cls);
public object? GetLParam (Type cls);
public object GetLParam (Type cls);
member this.GetLParam : Type -> obj
Public Function GetLParam (cls As Type) As Object

参数

cls
Type

用于创建实例的类型。The type to use to create an instance. 必须将该类型声明为结构类型。This type must be declared as a structure type.

返回

Object

Object,表示 cls 参数利用消息的 LParam 字段中的数据来指定的类的实例。An Object that represents an instance of the class specified by the cls parameter, with the data from the LParam field of the message.

注解

使用 GetLParam 方法可以从消息字段中检索信息 LParam ,并将其转换为对象。Use the GetLParam method to retrieve information from the LParam field of a message and convert it to an object. 您可以使用此方法访问在消息中传递的对象。You can use this method to access objects passed in a message.

适用于