is there any different between.....?

Started by jt,

jt

BOOL WINAPI BASS_Init(
    int device,
    DWORD freq,
    DWORD flags,
    HWND win
);

is there any different between HWND=0 and HWND=Handle?
what is better to use?

biggyspender


QuoteBOOL WINAPI BASS_Init(
    int device,
    DWORD freq,
    DWORD flags,
    HWND win
);

is there any different between HWND=0 and HWND=Handle?
what is better to use?

from programming DirectSound, I seem to remember that you need to pass DSound a window handle. Using NULL in BASS passes the desktop window. I assume that if you don't tidy up when your program exits, DSound attached to the desktop will carry on until the desktop dies i.e. logoff? maybe not... Ian?

Ian @ un4seen

That's not entirely true... when win=0, BASS uses the handle of the current foreground window, not the desktop :)

If your app has just been launched, it's main window is likely to be the foreground window, but to be sure, you should use the handle. win=0 is only really intended for use in console apps.