I want to create a wxWidget project and add a class that use DirectSound. But to do it i have to add WinAPI wind(hwnd) to my aplication. So should i add a hwnd to my wxWidget project, or there is an another opportunity to add DirectSound.
I tryed to create hwnd but it requires wWinMain funtion to get HINSTANCE so i dont know what can i do
With wxWidgets such as with any another widget toolkit i.e. : MFC, QT, FLTK etc, in most cases you don't need to manipulate system API directly.
Toolkit will do it for you in the same time, if you need to combine toolkit with some system API, tool kits usually provide an interface which can be used for integration.
In case of wxWidgets you can obtain a window HWND created by wxWindow with wxWindow::GetHandle. To obtain current module, you can use wxGetInstance
Anyway, wxWidgets provides API to interact with Sound API, with wxSound
There is an example