Search found 102 matches

by forrestcupp
Thu Jul 09, 2009 10:17 pm
Forum: C++ Development
Topic: Disabled wxButton still catches clicks and saves them
Replies: 9
Views: 992

Thank you for your suggestions. I had already tried Updating each button after disabling them, and that didn't work. So I tried Refreshing each button before the update, and that didn't help. Then I tried putting a wxYield() where you said to put it, and that didn't do the trick, either. Just so you...
by forrestcupp
Thu Jul 09, 2009 9:01 pm
Forum: C++ Development
Topic: wxAnimationCtrl and wxMouseEvent
Replies: 6
Views: 626

I've never tried it, but have you tried connecting your wxAnimationCtrl to a mouse event handler? In your declaration: void vOnMouseEvent(wxMouseEvent&); wxAnimationCtrl *myAnimation; With this handler: void MyTestClass::vOnMouseEvent(wxMouseEvent &) { std::cout << "Mouse event caught\n"; } But in y...
by forrestcupp
Thu Jul 09, 2009 8:48 pm
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'm not sure why you say that, the normal and good way to detect for clicks on a button is EVT_BUTTON I just realized that I have to use LEFT_UP because I use connects rather than event ...
by forrestcupp
Thu Jul 09, 2009 8:42 pm
Forum: C++ Development
Topic: Sound Open Delay
Replies: 4
Views: 522

What are you doing with the file? Are you putting it into a wxSound or wxMediaCtrl? It could possibly be something other than the file dialog.
by forrestcupp
Thu Jul 09, 2009 7:14 pm
Forum: C++ Development
Topic: Disabled wxButton still catches clicks and saves them
Replies: 9
Views: 992

I've been racking my brain trying to come up with a workaround so that I won't have to do it this way, like with timers and bools, but I can't figure anything out that works. In C# with .net, the solution to clearing the mouse clicks while a button is disabled is to do this: button1.Enabled = false;...
by forrestcupp
Thu Jul 09, 2009 12:48 am
Forum: C++ Development
Topic: Using wxSTC for displaying XML
Replies: 9
Views: 1265

I know this doesn't help you with your code, but if you're running Windows, you could try Notepad++.
by forrestcupp
Wed Jul 08, 2009 6:24 pm
Forum: C++ Development
Topic: Disabled wxButton still catches clicks and saves them
Replies: 9
Views: 992

Disabled wxButton still catches clicks and saves them

I have a wxButton that when it is clicked, it plays a wxSound file with wxSOUND_SYNC set. So right before I play the sound, I set btn->Enable(false) so I can't click it while the sound is being played. The thing is, it saves the mouse clicks until the button is enabled again and then sends it to the...
by forrestcupp
Wed Jul 08, 2009 6:16 pm
Forum: C++ Development
Topic: wxRichTextCtrl only loads txt files
Replies: 13
Views: 1837

But the thing is, the rich text sample is able to load an xml file that it saves and display the text with fonts, colors, pictures and all, not just the xml code. I'm trying to load an xml file that the sample saved, and it won't work at all. I've sifted through the sample code, and I can't figure o...
by forrestcupp
Tue Jul 07, 2009 2:24 am
Forum: Open Discussion
Topic: Newb C++ Pointers question.
Replies: 20
Views: 4756

Basically I am trying to do this (doesn't work, of course): printf("%X\n",*lpAddress); which should print the contents of memory location lpAddress BUT lpAddress is an int that is holding a value that is really my memory location I wish to see the contents of.[/quote] If you are wanting to print th...
by forrestcupp
Tue Jul 07, 2009 1:55 am
Forum: C++ Development
Topic: wxRichTextCtrl only loads txt files
Replies: 13
Views: 1837

What I mean is that it won't load the file at all. When it gets to that point, I get a runtime error that is a Dialogs Error message box that says, "File couldn't be loaded." It doesn't crash the program; it just gives me the error and leaves the wxRichTextCtrl empty. It does that with rtf's and xml...
by forrestcupp
Mon Jul 06, 2009 6:44 pm
Forum: C++ Development
Topic: wxRichTextCtrl only loads txt files
Replies: 13
Views: 1837

wxRichTextCtrl only loads txt files

I'm trying to load an xml file into a wxRichTextCtrl like this: richText = new wxRichTextCtrl(this, -1, wxEmptyString, wxPoint(50,200), wxSize(300,150), wxRE_MULTILINE | wxRE_READONLY); richText->LoadFile(wxT("test.xml"), wxRICHTEXT_TYPE_XML); I've tried loading XML, RTF, and txt files, and the only...
by forrestcupp
Mon Jul 06, 2009 6:13 pm
Forum: Compiler / Linking / IDE Related
Topic: wxRichTextCtrl causes linker error
Replies: 2
Views: 1034

Thank you. I included gdiplus.lib as a dependency in my project, and it worked.
by forrestcupp
Mon Jul 06, 2009 4:52 pm
Forum: Compiler / Linking / IDE Related
Topic: wxRichTextCtrl causes linker error
Replies: 2
Views: 1034

wxRichTextCtrl causes linker error

I installed wxWidgets version 2.8.9.02 with wxPack, so it should have set everything up correctly. I'm using Visual C++ Express 2008. When I try do define a wxRichTextCtrl, like this: richText = new wxRichTextCtrl(this, -1, wxEmptyString, wxPoint(50,200), wxSize(300,150), wxRE_MULTILINE | wxRE_READO...
by forrestcupp
Mon Jul 06, 2009 12:07 am
Forum: C++ Development
Topic: defining wxString on multiple lines
Replies: 2
Views: 871

Thank you! I tried doing what you said, only with +'s and commas, and neither one worked. I didn't think to try it with nothing in between.
by forrestcupp
Sun Jul 05, 2009 9:23 pm
Forum: C++ Development
Topic: defining wxString on multiple lines
Replies: 2
Views: 871

defining wxString on multiple lines

I want to define a long wxString on multiple lines, but I can't figure out how to do it. I've tried a lot of different things, and I can't find a way that works. I know it's easy to do it with a normal string in c++. Can someone show me the right way to do it. This is like what I want to do: wxStrin...