I can't get either of those methods to work...
The first way won't even compile because of this line:
SetWindowLongPtr(hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(WndProc));
WndProc is member function of type Window, and no matter what I do I cannot obtain/use its address in calling SetWindowLongPtr... doesn't make sense to me...
"Error 1 error C2440: 'reinterpret_cast' : cannot convert from 'LRESULT (__cdecl Window::* )(UInt32,WPARAM,LPARAM)' to 'LONG_PTR' C:\Users\ATC\Documents\Visual Studio 2012\Projects\D3D11Tutorial01\D3D11Tutorial01\gamewnd.cpp 142 1 D3D11Tutorial01"
The second way compiles and runs but no window is created or show at all... just a loop running and I have to click Stop Debugging to exit...
Show differencesHistory of post edits
#1ATC
Posted 19 October 2012 - 07:14 PM
I can't get either of those methods to work...
The first way won't even compile because of this line:
SetWindowLongPtr(hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(WndProc));
WndProc is member function of type Window, and no matter what I do I cannot obtain/use its address in calling SetWindowLongPtr... doesn't make sense to me...
The second way compiles and runs but no window is created or show at all... just a loop running and I have to click Stop Debugging to exit...
The first way won't even compile because of this line:
SetWindowLongPtr(hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(WndProc));
WndProc is member function of type Window, and no matter what I do I cannot obtain/use its address in calling SetWindowLongPtr... doesn't make sense to me...
The second way compiles and runs but no window is created or show at all... just a loop running and I have to click Stop Debugging to exit...