CWindow.ControlSetUsermethod
Sets the control's user data.
Syntax
FUNCTION ControlSetUser (BYVAL hCtl AS LONG, BYVAL index AS LONG, BYVAL userValue AS LONG_PTR) AS BOOLEAN
FUNCTION ControlSetUser (BYVAL cID AS LONG, BYVAL index AS LONG, BYVAL userValue AS LONG_PTR) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
hCtl | The handle of the control. | |
cID | The control identifier. | |
index | The index number of the user data value to set, in the range 0 to 9 inclusive. | |
userValue | The LONG_PTR data value to store in the user data area. |
Description
Sets the control's user data.
Remarks
Each control has a user data area consisting of ten LONG_PTR values which may be used at the programmer's discretion to save relevant data. ControlSetUser allows one of the values to be set, based upon the index parameter value (0 through 9).
Reference
- Include file
CWindow.inc - Defined in AfxNova/CWindow.inc:2048
- Documented in Windows/Windows GUI/CWindow Class.md
- Topic: CWindow Class