Sign in to follow this  
gade

just a simple question :)

Recommended Posts

I have a question to ask. Because of the need of program, my dx9 program created is a MFC project based on dialog. The window class created by anual. When i wanna reset device,it returns a mistake tip D3DERR_INVALIDCALL . but i found that i even if useing initialized value of D3DPRESENT_PARAMETERS of creating device will failed. So i want to know what aspects i need to pay attention to or where my mistake is in? Thanks for your bountiful helps. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by gade

I have a question to ask.
Because of the need of program, my dx9 program created is a MFC project based on dialog. The window class created by anual.
When i wanna reset device,it returns a mistake tip D3DERR_INVALIDCALL . but i found that i even if useing initialized value of D3DPRESENT_PARAMETERS of creating device will failed. So i want to know what aspects i need to pay attention to or where my mistake is in?
Thanks for your bountiful helps. :)



1) Use the DEBUG DirectX runtime (see the FAQ for this forum for more details).

When Direct3D returns an error such as D3DERR_INVALIDCALL, if you are using the DEBUG runtime, the reason WHY the call failed will be output to your debugger. This alone should be enough to find the problem.


2) If you take a look at an older version of the DirectX SDK, there are two samples, MFCTex and MFCFog which demonstrate how to make a Direct3D application which works properly with MFC.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this