win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinSetWindowULong (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINWINDOWMGR
 
BOOL WinSetWindowULong(hwnd, index, ul)
HWND hwnd;      /* handle of the window              */
SHORT index;    /* index into reserved memory        */
ULONG ul;       /* value to place in reserved memory */
 
The WinSetWindowULong function places an unsigned long integer value into
the reserved memory of a window.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hwnd       Identifies the window whose reserved memory is to be changed.
 
index      Specifies the zero-based index of the ULONG value to set. Valid
           values are in the range zero through the number of bytes of
           window data (for example, a value of 8 would be an index to the
           third long integer), or any of the following QWL values:
 
           Value              Meaning
           ─────────────────────────────────────────────────────────────────
           QWL_HHEAP          Handle of the heap.
 
           QWL_HMQ            Handle of the message queue of the window.
 
           QWL_HWNDFOCUSSAVE  Handle of the window that last had the focus.
 
           QWL_STYLE          Window style.
 
           QWL_USER           ULONG value present in windows of the
                              following preregistered window classes:
 
                                   WC_BUTTON
                                   WC_DIALOG
                                   WC_ENTRYFIELD
                                   WC_FRAME
                                   WC_LISTBOX
                                   WC_MENU
                                   WC_SCROLLBAR
                                   WC_STATIC
 
           This value can be used to retrieve application-specific data in
           controls.
 
ul         Specifies the unsigned long integer to place in the window's
           reserved memory.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Comments
 
The specified index is valid only if all the bytes referenced are within the
reserved memory. For example, this function would fail if an index value of
zero was specified and only 2 bytes had been reserved.
 
See Also
 
WinQueryWindowULong, WinRegisterClass, WinSetWindowBits, WinSetWindowUShort