My program keeps crashing when not in debugging mode. So now i'm debugging manually, or well, log everything to find where it is crashing
Oldproc = (PROC)SetWindowLong(Childs[1], GWL_WNDPROC, (DWORD)EditProc);
cout << "Oldproc\n";
SetFocus(MainWnd);
cout << "SetFocus() Done\n";
cout << "DIRECTX:\n";
DirectX = new DIRECTX(); // Creating DirectX
cout << "DirectX = new DIRECTX(MainWnd);\n";
Background = new CHARACTER("Background"); // Creating background
cout << "background\n";
Player1 = new CHARACTER("Player"); // Creating Player
cout << "player1\n";
Notices = new CHARACTER("Notice");
cout << "notice\n";
Due to that, I know that the error is somewhere in the DirectX Class.
But the strange thing is, the last message I get is
DIRECTX:
And no more. I should get some more because it is not possible that the function begins and immidiatly crashes without doing anything:
DIRECTX::DIRECTX(HWND Window) {
cout << "DIRECTX::DIRECTX\n";
this->counter = 0;
cout << "DIRECTX::counter\n";
this->DXWindow = Window;
cout << "DIRECTX::DXWindow\n";
this->Interface = 0;
cout << "DIRECTX::Interace\n";
this->Device = 0;
this->Sprite = 0;
InitInterface();
cout << "DIRECTX::InitInterface();\n";
InitDevice();
cout << "DIRECTX::InitDevice();\n";
InitSprite();
cout << "DIRECTX::InitSprite();\n";
}
Someone got an idea on what is happening? T_T. I'm almost killing myself, but I really want to finish the game before that XD!