In the Windows applications I work on, we have a custom framework that sits directly above Win32 (don\'t ask). When we create a window, our normal practice is to put
The other alternative is SetProp/RemoveProp (When you are subclassing a window that already uses GWLP_USERDATA)
Another good alternative is ATL style thunking of the WNDPROC, for more info on that, see