Jump to content
  • Advertisement
Sign in to follow this  
MartyJ

DirectX opening a window

This topic is 4881 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im having trouble opening a window in direct X. I'm completely new to direct X but have a reasonable knowledge of c++. Im using the latests version of Dev-c++ as my compiler. I get a compiler error when creating the device. This is the code im using to create the device. HRESULT r = 0; r = gD3dObject->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,g_hWndMain ,D3DCREATE_HARDWARE_VERTEXPROCESSING, &d3dpp, &gD3dDevice); The compiler error is: no matching function for call to `IDirect3D9::CreateDevice (int, _D3DDEVTYPE, HWND__*(&)(), long int, D3DPRESENT_PARAMETERS*, candidates are: virtual HRESULT IDirect3D9::CreateDevice(unsigned int, _D3DDEVTYPE, HWND__*, long unsigned I've no idea what this means really, and google efforts have gone in vain. Any help on the matter would be really appreciated. Thankyou in advance for any replies.

Share this post


Link to post
Share on other sites
Advertisement
At first glance, I think it's seeming to think that g_hWndMain is a function identifier, not an HWND identifier.

Share this post


Link to post
Share on other sites
Yes that was the problem, I accidently defined g_hWndMain as a function. Thankyou for the quick reply.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!