Search found 51 matches

by lordmaiku
Mon Sep 14, 2009 11:51 pm
Forum: C++ Development
Topic: Image won't load... "Image file is not of type xx"
Replies: 2
Views: 965

Oops, sorry, I should have mentioned that yes, all image handlers are initialized. Edit: I discovered that if I save the data directly to disk and then load it with wxImage(fileName), the image loads correctly... which makes me wonder if there is a problem with the way wxImage loads a const unsigned...
by lordmaiku
Mon Sep 14, 2009 10:30 pm
Forum: C++ Development
Topic: Image won't load... "Image file is not of type xx"
Replies: 2
Views: 965

Image won't load... "Image file is not of type xx"

Hello, I am reading embedded image data from a binary file and trying to stick it in a wxImage, and ultimately a wxBitmap. The image data is always in JPEG format, and the image data is not corrupt: if I dump the bytes to a file the image loads fine in Windows Explorer/Gallery. The error I get speci...
by lordmaiku
Mon Jul 13, 2009 5:34 pm
Forum: C++ Development
Topic: Getting an error bell when tabbing to a radio button?
Replies: 0
Views: 640

Getting an error bell when tabbing to a radio button?

Hi there, I have a form with a wxSpinCtrl, a few wxRadioButtons in a single group, and two wxButtons. There are a few wxStaticText labels in between. My problem is that when tabbing from the wxSpinCtrl to the radio group, there is an error bell, and I can't figure out why... the actually tabbing wor...
by lordmaiku
Fri Jun 05, 2009 10:30 pm
Forum: C++ Development
Topic: How to write special characters in wxString
Replies: 3
Views: 2515

Thanks Auria, that's exactly what I needed.
by lordmaiku
Thu Jun 04, 2009 6:32 am
Forum: C++ Development
Topic: How to write special characters in wxString
Replies: 3
Views: 2515

How to write special characters in wxString

It seems like it should be really simple. I want a copyright symbol in a literal wxString, so I used the alt pad to put one in. It works fine in Windows, but compiling on Linux gives me this error: error: converting to execution character set: Invalid or incomplete multibyte or wide character. The c...
by lordmaiku
Sat Apr 04, 2009 11:30 pm
Forum: C++ Development
Topic: Why are my mutexes leaking memory?
Replies: 1
Views: 1358

Why are my mutexes leaking memory?

Hello, I have some global recursive mutexes that I use in one of my classes (to make sure data is accessed by two threads at once of course). They're declared like this: static wxMutex *gs_mutex1 = new wxMutex( wxMUTEX_RECURSIVE ); static wxMutex *gs_mutex2 = new wxMutex( wxMUTEX_RECURSIVE ); static...
by lordmaiku
Tue Mar 10, 2009 10:57 pm
Forum: Platform Related Issues
Topic: Create Applications entry from makefile
Replies: 2
Views: 913

Thanks!
by lordmaiku
Sun Mar 08, 2009 10:09 pm
Forum: Platform Related Issues
Topic: Create Applications entry from makefile
Replies: 2
Views: 913

Create Applications entry from makefile

Hi,

I have created a makefile to build/install my application on Linux... and I think it would be really nice if I could automatically create an entry in the Gnome Applications menu for my application. Can I do that in the install rule of my makefile?

Thanks!
by lordmaiku
Sat Mar 07, 2009 4:26 am
Forum: Platform Related Issues
Topic: Linux Debugging
Replies: 4
Views: 1332

Well apparently Windows just completely ignores my critical sections locks, because there was a bug that would obviously cause a deadlock (and did, on Linux) but didn't on Windows. Well after I fixed that, it started right up! Thanks
by lordmaiku
Fri Mar 06, 2009 10:17 pm
Forum: Platform Related Issues
Topic: Linux Debugging
Replies: 4
Views: 1332

It literally does nothing. Called from the shell: no errors, no messages. It's like it starts and quits immediately without error.
by lordmaiku
Fri Mar 06, 2009 6:39 am
Forum: Platform Related Issues
Topic: Linux Debugging
Replies: 4
Views: 1332

Linux Debugging

Hello, So this evening I've worked on compiling my application on Linux for the first time. After some minor adjustments to the code to appease g++, it compiles perfectly well, with no errors. But... when I try and start the app, nothing happens. Nothing at all. Which is quite puzzling. Where do I b...
by lordmaiku
Wed Feb 18, 2009 8:19 pm
Forum: C++ Development
Topic: When debugging, sometimes main window doesn't appear...
Replies: 3
Views: 1025

Ok, I've found a little more info. I'm able to repro this consistently on another system. It seems that the problem IS in my main window initialization... specifically when I call this->SetDropTarget( new myFileDropTarget() ). In wxWindowMSW::SetDropTarget, execution freezes at m_dropTarget->Registe...
by lordmaiku
Sun Feb 15, 2009 9:58 pm
Forum: General Development
Topic: rand() returning consistent results when running a game
Replies: 1
Views: 1042

rand() returning consistent results when running a game

This is more a general question than a wxWidgets question, but I thought people might be interested. In my app I do an srand() on startup in the class that makes calls to rand(), to make random selections from a list of music files. This is for the 'Shuffle' mode. Interestingly, however, if I start ...
by lordmaiku
Thu Feb 12, 2009 5:45 am
Forum: C++ Development
Topic: When debugging, sometimes main window doesn't appear...
Replies: 3
Views: 1025

It's pretty standard stuff... here is my OnInit: bool myApplication::OnInit( void ) { // Extra wxWidgets setup wxStandardPaths sp; wxString path = sp.GetExecutablePath(); wxSetWorkingDirectory(path); wxImage::AddHandler( new wxPNGHandler() ); wxFileSystem::AddHandler( new wxMemoryFSHandler() ); // C...
by lordmaiku
Wed Feb 11, 2009 8:35 am
Forum: C++ Development
Topic: Using/Launching the File(or Folder) "Properties" D
Replies: 8
Views: 1784

Hello, Take a look at http://docs.wxwidgets.org/stable/wx_processfunctions.html#wxexecute , which is sort of like ShellExecute. You can probably use it to call up that dialog. Otherwise, you could just call ShellExecuteEx like you do in MFC... nothing says you have to do it with a wxWidgets function...