Technically, GWLP_USERDATA is designed to use the window class (base in the case of a subclass) to use. Since dialogs are a ready-made class, GWLP_USERDATA is intended for internal use, so dialogs provide the DWLP_USER field for use in using DialogProc.
However, be that as it may, all of the internal window classes supplied by Microsoft - EDIT, BUTTON, Dialog, etc., do not and cannot use GWLP_USERDATA for application compatibility purposes, therefore they are effectively available for using the application.
source
share