Hydrogenaudio Forums

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: Verbal41 on 2003-05-22 03:37:14

Title: foo minibar
Post by: Verbal41 on 2003-05-22 03:37:14
Hi

This message is intended for Curious George author of foo minibar.  I was wondering if there was anyway to make the minibar connect to the foobar2000 window, kind of like the EQ or playlist in winamp for example.  Thanks for the help.

-V
Title: foo minibar
Post by: Curi0us_George on 2003-05-22 03:50:57
Nope, not without Peter flogging me for hacking.
Title: foo minibar
Post by: Aero on 2003-05-22 05:46:51
That's not necessarily correct - you get the Foobar window position and move your window to match (or vice versa).  No hacking involved.

Besides, which SDK function are you using to get the Follow Cursor setting... 
Title: foo minibar
Post by: Curi0us_George on 2003-05-22 06:00:00
I'm not polling for the window position.  (Actually, I'd have to poll for the window rect.)  There's too much polling going on already.  Besides, it would be ugly as sin, all jittery from the 200 millisecond delay between rect queries.

The only way to do it without polling for the window rect is to subclass the main window, and that'd get me a warning, possibly banned.  Peter's not a fan of main window subclassing.  My follow cursor poll is already sort of hackish, even though I'm not using the resource id.  I'll pull it from the code if Peter ever adds a proper way to get that info.
Title: foo minibar
Post by: Aero on 2003-05-22 06:09:20
Quote
I'm not polling for the window position.  (Actually, I'd have to poll for the window rect.)  There's too much polling going on already.  Besides, it would be ugly as sin, all jittery from the 200 millisecond delay between rect queries.

The only way to do it without polling for the window rect is to subclass the main window, and that'd get me a warning, possibly banned.

No polling necessary - look into SetWindowsHookEx(), and use the appropriate hook type (maybe WH_CBT, but watching WM_MOVING/WM_MOVE with WH_CALLWNDPROC or maybe WH_GETMESSAGE would also work).
Title: foo minibar
Post by: Curi0us_George on 2003-05-22 06:22:00
I really don't think Peter would go for that.  That's pretty much the same thing as subclassing.
Title: foo minibar
Post by: freax on 2003-05-22 10:56:20
Cool plug-in.
Now there is a seek bar I always use it  THX !

This is simple, fonctionnal, nothing useless (maybe the seek forward buttons should be kicked  ) but hey, this is what I needed !!!

With this and uftS, foobar is far the most ergonomic player

Little question : why is msvcr70.dll needed ? This makes a 336Ko dll which is annoying for me because I used to make an ultimate diskette with everything necessary for Windows, and I can't had your plug-in then...
I don't know why this is needed because for example uftS doesn't need it, and I don't think minibar can do something uftS can't (this is not a negative critic...)

Maybe I am false (surely  )

Well, thanks a lot, and see you
Title: foo minibar
Post by: Curi0us_George on 2003-05-22 18:08:46
Thanks.  I'm glad you like the plugin. 

msvcr70 is the C runtime library.  It's used by C++ programs/dlls compiled with Visual Studio .NET.

Most (all?) of the other plugins are compiled with Visual C++ 6, so they use an older version of the DLL, which just happens to be on about 99% of computers already.

I might look into it later and see if I can link to the older DLL.  I'm not sure if it's possible or not.
Title: foo minibar
Post by: Aero on 2003-05-22 19:43:21
Quote
I might look into it later and see if I can link to the older DLL.  I'm not sure if it's possible or not.

Do you have VC++ 6?  I had no problems building your code with it, and the resulting exeuctable was a couple of kB smaller...
Title: foo minibar
Post by: Curi0us_George on 2003-05-22 19:49:08
No, I do not have VC6.
Title: foo minibar
Post by: rotjong on 2003-06-25 22:31:36
I just wanted to thank you for this addon, Curi0us George. Perfection!
Title: foo minibar
Post by: CrazyCoder on 2003-06-25 22:49:50
By default VC7 compiles projects and dynamically links to the VCR70.dll. By changing project options it is possible to link it statically. It will increase the target executable/dll size, but it will be smaller than the dll itself.

My AMIP plug-in is compiled in this way. It doesn't need any additional libraries and will work on any Windows.

You need to compile your project and the Foobar SDK with the following changes in options:

Configuration Properties | C/C++ | Code Generation | Runtime library -> Multi-threaded (/MT).
In your project, it may be also necessary to ignore some libraries in the Linker options to prevent conflicts (LIBC).

Of course, it is up to you how to build your dll, just my 2 cents =)
Title: foo minibar
Post by: Curi0us_George on 2003-06-26 05:25:15
rotjong:
Glad you like it. 

CrazyCoder:
I briefly tried statically linking my libraries to the CRT, but it wasn't worth the increased size.  I'd rather just distribute the dll.  (Actually, I should really be pointing to a copy of the dll on msdn.)
SimplePortal 1.0.0 RC1 © 2008-2020