Jump to content
  • Advertisement
Sign in to follow this  
davethebrave

directx in console?

This topic is 4696 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

Advertisement
the problem is that I need HWND to set Cooperative Level.
how do i get this from my console app or can i skip it?

if(FAILED(DirectSoundCreate8(NULL, &g_pDSound, NULL))) return false;
g_pDSound->SetCooperativeLevel(hWnd, DSSCL_PRIORITY);

Share this post


Link to post
Share on other sites
Quote:
Original post by davethebrave
the problem is that I need HWND to set Cooperative Level.
how do i get this from my console app or can i skip it?

if(FAILED(DirectSoundCreate8(NULL, &g_pDSound, NULL))) return false;
g_pDSound->SetCooperativeLevel(hWnd, DSSCL_PRIORITY);

You can always create a window, but just not show it. This will give you an HWND, but the window still won't appear. I do this for D3D console applications where I am only processing data using the GPU.

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!