Skip to main content
gamedev.net
🔒 Locked

D3D errors [resolved]

Started by Envii 1 reply 1.1k views
Original Post
Envii
Envii
I am building a framework that I can use in the future, so right now I have a few simple classes that initialize a window, initialize DirectX, get basic user input, and the only thing I have my render function doing is clearing the screen, but if I run the program in windowed mode, I get 3 errors (I don't get them in full screen mode). The program still runs and clears the screen. In case you need to know I am using DirectX9.0 SDK Aug 2005. And if you need me to post code I can.... The 3 errors are: Direct3D9: (ERROR) :GetClientRect Failed ? Direct3D9: (ERROR) :GetClientRect Failed ? Direct3D9: (ERROR) :BitBlt or StretchBlt failed in Present Any help is greatly appreciated! [Edited by - Envii on October 11, 2006 2:32:16 AM]
Programmer16
Programmer16
I assume this happens when you click the X button on the window's title-bar to close it?

I've only had this happen for one reason and that was because my window was gone (I wasn't handling WM_DESTROY or WM_CLOSE.)

If you're not handling WM_DESTROY or WM_CLOSE in your Windows procedure, try adding:
case WM_CLOSE:case WM_DESTROY:{    PostQuitMessage(0);    break;}


HTH!
Envii
Envii
You put me on the right track and I fixed it! Thanks a ton!! I was posting a quit message, but I would still render one more time after. To fix it, I switched it around so it wouldn't draw that last frame, and it works great now!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.