LRESULT CALLBACK Engine::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if(bStarted)
return MsgProc(hWnd, msg, wParam, lParam);
else
return DefWindowProc (hWnd, msg, wParam, lParam);
}
So that the function checks if a bStarted boolean in the Engine class is true before returning the MsgProc function.
The problem is that when I make WindowProc a function in the Engine class I get an error that the argument list is missing when I try to create the window. But if I make the WindowProc class static I dont have access to the bStarted var or the MsgProc function.
I looked in a couple of books but the books all make the main class a global singleton to make things simpler so I'm pretty stumped on how to do this.