Ok, So I'm trying to create a 3D engine with DirectX 9, and I have run into a runtime error that says "Stack overflow". When I encountered this, I thought that it might have came from a for loop, so I checked that they went forever, and they all were fine. I still had this error after that and I couldn't figure out why it was or where the error was coming from so I put calls to MessageBox everywhere to tell me which part of code it's executing at that time, but they won't even show up! What I need help with is how to get the message boxes to show up and how to fix the Stack Overflow problem, I have attached the code in a .zip file.
BTW I'm using WinXP and VC++.