wxMediaCtrl, how to use it?
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
wxMediaCtrl, how to use it?
Hi, I am using Codeblocks with wxSmith plugin and I need help how to use wxMediaCtrl for Mp3 playing. Would someone send simple(very simple if posible) code, which will play any *.mp3 file? Thank you for your every help of this.
(I am sorry for my bad english)
(I am sorry for my bad english)
-
- Part Of The Furniture
- Posts: 7481
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Re: wxMediaCtrl, how to use it?
Hi,
Please look at the media{ctrl} sample.
Compile it, run it and see if you can play the file you want.
Thank you.
Please look at the media{ctrl} sample.
Compile it, run it and see if you can play the file you want.
Thank you.
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
Re: wxMediaCtrl, how to use it?
Thank you so much for answer, but what if i will want to use that, like wxSound? Without gui for that.
-
- Moderator
- Posts: 19164
- Joined: Fri Apr 21, 2006 8:03 pm
- Location: $FCE2
Re: wxMediaCtrl, how to use it?
You can't use wxMediaCtrl like wxSound. But you can Hide() the control after creation, then it will be invisible.
Use the source, Luke!
-
- Part Of The Furniture
- Posts: 7481
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Re: wxMediaCtrl, how to use it?
Hi,
Well, there is a sound sample and the console sample which you can look at.
Thank you.
Well, there is a sound sample and the console sample which you can look at.
Thank you.
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
Re: wxMediaCtrl, how to use it?
Oh, that sounds badly for me, because I can't find the MediaCtrl between components in panel of them.
-
- Part Of The Furniture
- Posts: 7481
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Re: wxMediaCtrl, how to use it?
Hi,
Are you using some kind of EAD tool? Which one - wxSmith, wxGlade, wxCrafter?
Thank you.
Are you using some kind of EAD tool? Which one - wxSmith, wxGlade, wxCrafter?
Thank you.
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
Re: wxMediaCtrl, how to use it?
I am using Codeblocks with wxSmith
-
- Part Of The Furniture
- Posts: 7481
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Re: wxMediaCtrl, how to use it?
Hi,
You can try to put some placeholder (wxStaticText with the text "Media goes here") and after you done and the code is generated, replace it with the actual wxMediaCtrl.
Or you can just create the design by hand...
Thank you.
You can try to put some placeholder (wxStaticText with the text "Media goes here") and after you done and the code is generated, replace it with the actual wxMediaCtrl.
Or you can just create the design by hand...
Thank you.
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
Re: wxMediaCtrl, how to use it?
It works! , thank you so much.
Is it okay, if it hasn't icon, it looks like a custom widget, and it has same events as a custom widget?
Is it okay, if it hasn't icon, it looks like a custom widget, and it has same events as a custom widget?
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
Re: wxMediaCtrl, how to use it?
Oh, when i compile that, that works and it plays a .mp3 file... but it also delete the header of mediactrl and also MediaCtrl1 = new wxMediaCtrl(this,...
-
- Part Of The Furniture
- Posts: 7481
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Re: wxMediaCtrl, how to use it?
Hi,
But you said you want to hide the control? So of course everything will be hidden...
Thank you.
But you said you want to hide the control? So of course everything will be hidden...
Thank you.
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
Re: wxMediaCtrl, how to use it?
Yes, but that's occupies the place of window, so it's looking weird.
-
- Moderator
- Posts: 19164
- Joined: Fri Apr 21, 2006 8:03 pm
- Location: $FCE2
Re: wxMediaCtrl, how to use it?
What exactly is the problem right now?
Do you want the control to be visible or not?
Do you want the control to be visible or not?
Use the source, Luke!
-
- In need of some credit
- Posts: 8
- Joined: Thu May 10, 2018 5:19 pm
Re: wxMediaCtrl, how to use it?
https://ctrlv.cz/3vdG
It doesn't have appearance, so that is invisible every time, but It looks weird, because it occupies a place.
(I am sorry for my english)
It doesn't have appearance, so that is invisible every time, but It looks weird, because it occupies a place.
(I am sorry for my english)
Last edited by egwqgwe on Sat May 12, 2018 12:57 pm, edited 1 time in total.