PRB: Windows Properties Warning Using GWL_USERDATA in Win32sLast reviewed: May 17, 1996Article ID: Q147433 |
The information in this article applies to:
SYMPTOMSIf an application uses SetWindowLong() with GWL_USERDATA in Win32s, then the debug version of Windows will issue warning messages saying that some window properties were not removed when the window is destroyed.
CAUSEGWL_USERDATA is supported under Win32s, even though this feature is not available under Windows 3.x. In Win32s, GWL_USERDATA is implemented by adding two window properties to the window, one per 16-bit property. These window properties are not removed by Win32s when the window is destroyed.
RESOLUTIONEven though Win32s does not remove the window properties, they are actually deleted by Windows upon application termination. No memory leak will occur from this problem, so it is safe to ignore the warning in most cases. In the case where your application uses the GWL_USERDATA with a large number of windows, these window properties are not freed until the application terminates. A workaround or suggestion for such a situation would be to use WNDCLASS.cbWndExtra instead of GWL_USERDATA.
STATUSThis behavior is by design.
|
Additional reference words: 1.30 win32s gwl_userdata
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |