Need help with using `wxMediaCtrl`.

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 2662
Joined: Sun Jan 03, 2010 5:45 pm

Re: Need help with using `wxMediaCtrl`.

Post by PB » Wed Oct 21, 2020 4:07 pm

apoorv569 wrote:
Wed Oct 21, 2020 3:34 pm
I get error when compiling

Code: Select all

../src/frame.cpp:48:24: error: ‘wxEVT_SCROLL’ was not declared in this scope; did you mean ‘EVT_SCROLL’?
   48 |     volumeSlider->Bind(wxEVT_SCROLL, &Frame::Volume, this);
      |                        ^~~~~~~~~~~~
      |                        EVT_SCROLL
I think this may be the only disadvantage of Bind() I have found. Unlike with message maps, one cannot Bind wxEVT_SCROLL, the individual scroll events must be Bound separately. However, you have a wxSlider so can use just wxEVT_SLIDER instead, can't you?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4529
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Need help with using `wxMediaCtrl`.

Post by ONEEYEMAN » Wed Oct 21, 2020 4:25 pm

Hi,
Before we going any further let me tell you - you absolutely need to have the knowledge of the language you are using - in this case it is C++. You can't expect people here to teach it to you - this is not a c++ school.

Please find a local college where you can learn the language, then come back to do the programming with the advanced c++ library.

On the other hand maybe using python and wxpython will be easier?

Thank you.

User avatar
doublemax
Moderator
Moderator
Posts: 15264
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Need help with using `wxMediaCtrl`.

Post by doublemax » Wed Oct 21, 2020 6:33 pm

I played around with your code and noticed that the default mediaplayer backend under Windows, wxMEDIABACKEND_DIRECTSHOW, does not generate the wxEVT_MEDIA_LOADED event (any more?).

When using wxMEDIABACKEND_WMP10, it worked.

Here are the modified files. I made a few other changes for testing purposes only, you can revert these of course.
frame.cpp
(6.94 KiB) Downloaded 5 times
frame.hpp
(1.64 KiB) Downloaded 5 times
Use the source, Luke!

Post Reply