January 26, 2017
I was trying to figure out why calling an object's function from a wndProc that modified the object's state didn't actually change anything. Wrapping the GetWindowLongPtr in a cast(void*) seems to make it work. What am I missing about this? I though that object references were really just pointers with special restrictions/behaviors?

Old:
    window = cast(Win32Window) GetWindowLongPtr(hwnd, GWLP_USERDATA);

New:
    window = cast(Win32Window) (cast(void*) GetWindowLongPtr(hwnd, GWLP_USERDATA));