Author Topic: is there any different between.....?  (Read 5461 times)

jt

  • Guest
is there any different between.....?
« on: 27 Aug '03 - 12:36 »
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

  • Posts: 28
Re: is there any different between.....?
« Reply #1 on: 29 Aug '03 - 14:19 »

Quote

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?


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

  • Administrator
  • Posts: 20437
Re: is there any different between.....?
« Reply #2 on: 29 Aug '03 - 16:10 »
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.