Search found 118 matches

by JohnD
Mon Apr 26, 2010 8:54 am
Forum: C++ Development
Topic: Get path to current module/EXE?
Replies: 6
Views: 5009

Thanks for that. It seemed a bit weird to instance the class but I hadn't spotted that in the docs.
by JohnD
Fri Apr 23, 2010 12:33 am
Forum: C++ Development
Topic: Get path to current module/EXE?
Replies: 6
Views: 5009

I think Frank gave me the answer, but sure I can give more detail. When the app is run, the working dir might not be the location where the EXE (or *nix equivalent) is located - for example in Windows if you double-click a file associated with an app, the working dir is set as the dir of the file. I...
by JohnD
Thu Apr 22, 2010 7:26 pm
Forum: C++ Development
Topic: Get path to current module/EXE?
Replies: 6
Views: 5009

Get path to current module/EXE?

I can easily get the current working dir, but how can I get the path to the EXE that is running? I can remember Win32 functions for it, but can't see the wx equivalent... does it exist? (v2.8.10)
by JohnD
Sat Mar 20, 2010 12:37 pm
Forum: C++ Development
Topic: Loading & interacting with a DLL
Replies: 1
Views: 527

Loading & interacting with a DLL

Does the MSW wxWidgets have any helpful functionality to load a DLL at run-time so I can instantiate a class contained within? As a perhaps more general question, what if that DLL was written in C# and contained dialogs using Winforms... are there any reasons I can't do (from a C++ wx app): Load DLL...
by JohnD
Wed Jan 20, 2010 6:23 pm
Forum: C++ Development
Topic: Basic question about custom events
Replies: 4
Views: 973

Aha, that's exactly the kind of setup I was hoping for!
by JohnD
Wed Jan 20, 2010 2:54 pm
Forum: C++ Development
Topic: Basic question about custom events
Replies: 4
Views: 973

Re: Basic question about custom events

Hi, how a CCar can throw out events like GearChangeEvent, and the widgets catch these events? By setting the correct destination for the events... But the point is the CCar doesn't know the destination(s) - isn't that the whole point of an event-based system? A secondary question is whether in this...
by JohnD
Wed Jan 20, 2010 2:24 pm
Forum: C++ Development
Topic: Basic question about custom events
Replies: 4
Views: 973

Basic question about custom events

Say I have a class CCar in my app. CCar maintains data about the vehicle's current state, and has methods which modify that state... like CCar::ChangeGearUp(), etc. I also have several custom controls / widgets which display information about the CCar, and can give it instructions. So wxGearStick mi...
by JohnD
Fri Oct 09, 2009 3:59 pm
Forum: C++ Development
Topic: Set app-wide default colors, to override OS defaults?
Replies: 2
Views: 658

Yes I think we have to lose the native OS colors. We basically want to change the default color wx will pick when a new window is created... applying this to the topFrame and custom dialogs.
by JohnD
Fri Oct 09, 2009 10:34 am
Forum: C++ Development
Topic: Set app-wide default colors, to override OS defaults?
Replies: 2
Views: 658

Set app-wide default colors, to override OS defaults?

Our app has buttons which require us to set an overall default background color for all windows, overriding the different colors used on different OS.
Rather than set every control's colors, can we put some code in at startup which changes the defaults?
by JohnD
Fri Oct 09, 2009 7:35 am
Forum: C++ Development
Topic: Is there an exact formula/pattern to nested sizers?
Replies: 5
Views: 871

Auria wrote:It's a bit hard to tell from so little code; can you reproduce your issue in a self-contained compilable snippet?
Not so easily, we have a bunch of custom controls. I may strip it down as part of my testing though, in which case I'll try.
by JohnD
Thu Oct 08, 2009 5:41 pm
Forum: C++ Development
Topic: Is there an exact formula/pattern to nested sizers?
Replies: 5
Views: 871

What about the order of when you add things as children and so on? Does it make any difference? e.g should you set the top-level sizer for your Topframe and then add child controls/sizers, or totally populate your layout hierarchy first? Here's a very simplified version, since the full thing is long...
by JohnD
Thu Oct 08, 2009 11:16 am
Forum: C++ Development
Topic: Is there an exact formula/pattern to nested sizers?
Replies: 5
Views: 871

Is there an exact formula/pattern to nested sizers?

We have a TopFrame subclassing from wxPanel, and the layout of this is controlled by a few nested box-sizers. So the TopFrame first creates a 'dummy' child panel which the top-level sizer works with... then various things happen with adding controls and child sizers etc. It seems there are a whole b...
by JohnD
Mon Sep 07, 2009 10:58 pm
Forum: Platform Related Issues
Topic: wx 2.8.9, MacOS 10.5: crashes GDB?
Replies: 4
Views: 1009

Going to test further. It's a custom component so it could be that which has the problems; however the fact it now definitely seems to be crashing in Layout() worries me if this is the case. We create a few different large components in the TopFrame constructor (selected through XML); I'll try remov...
by JohnD
Mon Sep 07, 2009 8:33 pm
Forum: Platform Related Issues
Topic: wx 2.8.9, MacOS 10.5: crashes GDB?
Replies: 4
Views: 1009

Hmm, removing something from my TopFrame lets the app start. Is it possible Layout can cause a crash if the minimum window size is too big?
by JohnD
Mon Sep 07, 2009 5:49 pm
Forum: Platform Related Issues
Topic: wx 2.8.9, MacOS 10.5: crashes GDB?
Replies: 4
Views: 1009

wx 2.8.9, MacOS 10.5: crashes GDB?

I can't run the mac port of our app on my modern Macbook (aluminium Intel based). It seems to start up and hang forever if run normally, and through the debugger it behaves very strangely: If I single-step it may work, otherwise at some point before actually doing anything interesting the debugger i...