Possible Duplicate:
Best method for storing this pointer for use in WndProc
I'm trying to write a generic class that handles Win32 controls, the problem is, the WndProc message handler function is static so I cannot access important local class members such as the hWnd from the function unless I make them static too and instantiate them in the global namespace.
Now I did try that but quickly discovered the minute I created another instance of the control class, the previously created instance got its static member values over written by the new one. Does anybody have an idea about how to go about implementing this class? Is it possible to somehow have multiple instances of a static member?
Thanks,