Original Post
I'm trying to pass my window proc through a function so I can assign it to my windows class. THis is what I have:
TRESULT TempestKernel::InitWindow(int width,
int height,
LPSTR wndTitle,
MODE windowMode,
LRESULT CALLBACK WndProc)
{
....
winClass.lpfnWndProc = WndProc;
...
}
In my main code:
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
...
}
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
...
game->InitWindow(400,400,"Tempest",WINDOW,WndProc);
...
}
Yet errors are generated on compile So, what do I need to do to pull this off? Cheers