Search found 102 matches

by forrestcupp
Sat Jul 04, 2009 3:08 am
Forum: C++ Development
Topic: Another wxMediaCtrl problem - maybe a bug when loading?
Replies: 4
Views: 551

I filed a bug report yesterday and it got closed because they thought it was a duplicate of another report I filed pertaining to the Finished event. I may be forced to go another route like SDL mixer. Edit: I just found out it was reopened because they didn't realize it was a different event than th...
by forrestcupp
Fri Jul 03, 2009 2:56 am
Forum: C++ Development
Topic: Why is Handler called two times?
Replies: 13
Views: 955

If you want to handle an event when a button is clicked, maybe you should use EVT_LEFT_UP instead of EVT_BUTTON. I really think you're making this way more complicated that it needs to be without a good reason. Why wouldn't you just do something like: wxButton* button = new wxButton(this, wxID_OK, w...
by forrestcupp
Fri Jul 03, 2009 2:44 am
Forum: C++ Development
Topic: [Q] Moving image...
Replies: 7
Views: 759

Or you could just do all your drawing on a DC in a Paint event and fire it with a Refresh() in a wxTimer. If you use a timer, you can tell it exactly how often in milliseconds to update the drawing that takes place in your paint event.

It really doesn't have to be that complicated.
by forrestcupp
Fri Jul 03, 2009 2:35 am
Forum: C++ Development
Topic: BUG with WxMediaCtrl wxEVT_MEDIA_LOADED?
Replies: 11
Views: 2778

It's my experience that the Loaded event works in XP, but it doesn't work in Vista. I have a bug ticket submitted for this. For those of you who have it working in Windows, are you using Vista or XP? And those who can't get it to work, are you in Vista? If that is the case, we're probably out of luc...
by forrestcupp
Fri Jul 03, 2009 2:31 am
Forum: C++ Development
Topic: wxEVT_MEDIA_FINISHED doesn't work with mp3's
Replies: 2
Views: 575

Thanks. I got the ticket filed.
by forrestcupp
Fri Jul 03, 2009 2:05 am
Forum: C++ Development
Topic: Another wxMediaCtrl problem - maybe a bug when loading?
Replies: 4
Views: 551

Well, that's good advice, and it's advice that I'd like to take. But there's a problem. For some reason the Loaded event doesn't work in Vista. So when I load the file, it can't be immediately played, and I don't have any way that works to catch the Loaded event. I've used the exact same code that w...
by forrestcupp
Thu Jul 02, 2009 6:08 pm
Forum: C++ Development
Topic: Another wxMediaCtrl problem - maybe a bug when loading?
Replies: 4
Views: 551

Another wxMediaCtrl problem - maybe a bug when loading?

I've had a lot of wxMediaCtrl questions. Hopefully this is my last one. I have a program that initializes and loads around 20 different wxMediaCtrls that are all small wav's and mp3's not more than 15 seconds long. These sounds don't get played until later. For some reason, sometimes when the medias...
by forrestcupp
Thu Jul 02, 2009 1:48 pm
Forum: C++ Development
Topic: wxMediaCtrl from a wxMemoryInputStream?
Replies: 0
Views: 206

wxMediaCtrl from a wxMemoryInputStream?

Is it possible to load a wxMediaCtrl from a stream? I'm wanting to put all of my sound files in my resources, and the only way I've found to extract them is with a wxMemoryInputStream. So I can get my mp3's into a memory input stream, but I can't figure out how to get it into a wxMediaCtrl, now. Doe...
by forrestcupp
Thu Jul 02, 2009 2:40 am
Forum: C++ Development
Topic: wxEVT_MEDIA_FINISHED doesn't work with mp3's
Replies: 2
Views: 575

wxEVT_MEDIA_FINISHED doesn't work with mp3's

I've connected a wxMediaCtrl to a Finished event where I play it again so it will loop. I used common code that everyone uses, and I've been really frustrated for a while because I couldn't get it to work. So I tried loading a .wav file instead of an mp3 and it worked perfectly without my needing to...
by forrestcupp
Tue Jun 30, 2009 2:56 am
Forum: C++ Development
Topic: Trouble animating bitmaps with a timer
Replies: 6
Views: 690

One last post. I figured out the answer. I kept everything in my paint event with a wxBufferedPaintDC, which didn't help the flicker by itself. I'm drawing everything on a main panel that takes up the entire frame. So I found out I can call panel->SetDoubleBuffered(true); After I did that, the flick...
by forrestcupp
Tue Jun 30, 2009 2:46 am
Forum: C++ Development
Topic: ERASE_BACKGROUND not called, no way to avoid flicker!
Replies: 10
Views: 1435

Like DavidHart said, you have to either put an erase event in your event table, or connect it to something for it to be called. It's not enough to just have a function.
by forrestcupp
Tue Jun 30, 2009 2:14 am
Forum: C++ Development
Topic: Trouble animating bitmaps with a timer
Replies: 6
Views: 690

Right, but it doesn't support transparency in GIF animations, and that's what I need. Edit: I didn't see the word 'transparent' in your post. I couldn't get transparency to work in Windows; it just showed black. I've read that it works in Mac, but not Windows, and that is my experience, too. If you ...
by forrestcupp
Tue Jun 30, 2009 1:22 am
Forum: C++ Development
Topic: Trouble animating bitmaps with a timer
Replies: 6
Views: 690

Trouble animating bitmaps with a timer

Since wxAnimationCtrl doesn't support transparency in Windows, I'm having to do things manually, which I'm not familiar with, yet. I have an array of wxBitmaps that were created from png's with transparency. I use a wxTimer to advance to the next image in the array at the correct interval. Then I us...
by forrestcupp
Wed Jun 24, 2009 6:57 pm
Forum: C++ Development
Topic: Trouble with panels that overlap
Replies: 11
Views: 1016

It appears that you must use some kind of form builder or GUI designer. I'm doing all of my own coding, so that file didn't really help me. Could you upload your cpp file?
by forrestcupp
Wed Jun 24, 2009 2:42 am
Forum: C++ Development
Topic: Trouble with panels that overlap
Replies: 11
Views: 1016

No. The static text's parent is panel2.

It must be something that just works in GTK but not Windows Vista. Can you post your code for that part?