Is there a way to create an elegant class-member window-function?
publictal at gmail.com
Tue Dec 27 06:08:13 PST 2011
The Window-Procedure in the Win32 API must be static \ global function since
it cannot take a class-object (the this) parameter. One can of-course use
workarounds like a hWnd->object dictionary and such.
I wonder if D has a way to elegantly solve it, like create a tiny member
function copy for each object (to call the object's real handler) or anonymous
function that I can assign to WNDCLASS.lpfnWndProc (I know there are anonymous
functions, but I cannot use the extern(Windows) property on them) ?
More information about the Digitalmars-d-learn