directx in console?
hi!
is it possible to write a directx-app for the console?
i only need direct sound.
thx, dave
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);
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);
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.
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?
GetConsoleWindow.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement