Using DWL_USER to Access Extra Bytes in a Dialog BoxLast reviewed: November 2, 1995Article ID: Q88358 |
The information in this article applies to:
SUMMARYWindows extra bytes are used to store private information specific to an instance of a window. For dialog boxes, these extra bytes are already allocated by the dialog manager. The offset to the extra byte location is called DWL_USER. DWL_USER is the 8th byte offset of the dialog extra bytes. The programmer has 4 bytes (a long) available from this offset for personal use. CAUTION: DO NOT use more than 4 bytes of these extra bytes, as the rest of them are used by the dialog manager.
Example
DWORD dwNumber = 10; . . . . case WM_INITDIALOG: SetWindowLong(hWnd,DWL_USER,dwNumber); // Store value 10 at // byte offset 8 dwNumber = GetWindowLong(hWnd,DWL_USER); // Retrieve the valueNOTE: GetWindowWord and SetWindowWord could be used instead.
|
Additional reference words: 3.10 3.50 3.51 4.00 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |