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.
WinQueryWindowULong (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINWINDOWMGR
ULONG WinQueryWindowULong(hwnd, index)
HWND hwnd; /* handle of the window */
SHORT index; /* index of value to retrieve */
The WinQueryWindowULong function retrieves an unsigned long integer value at
a specified offset into the reserved memory of a given window.
The window handle that is passed to this function can be the handle of a
window with the same or a different message queue from the caller; that is,
this function allows the caller to obtain data from windows belonging to
other threads.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwnd Identifies the window to query.
index Specifies the zero-based index of the ULONG value to retrieve.
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. This value only applies to
frame windows.
QWL_HMQ Handle of the message queue of the window.
QWL_HWNDFOCUSSAVE Handle of the window that last had the focus.
This value only applies to frame windows.
QWL_STYLE Window style.
QWL_USER ULONG value present in windows of the
following preregistered window classes:
WC_DIALOG
WC_FRAME
WC_LISTBOX
WC_BUTTON
WC_STATIC
WC_ENTRYFIELD
WC_SCROLLBAR
WC_MENU
This value can be used to retrieve application-specific data in
controls.
Return Value
The return value is the specified ULONG value in the window's reserved
memory.
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 two bytes had been reserved.
See Also
WinQueryWindowUShort, WinRegisterClass, WinSetWindowULong
♦