Search found 211 matches

by Frank
Tue Aug 05, 2008 9:11 am
Forum: C++ Development
Topic: App hangs after wxApp::OnInit() returns false
Replies: 5
Views: 1087

Hi, your code hangs too. I think it is some timing problem, because when I end the application the normal way, by closing the MainFrame, or by putting an exit() somewhere outside of wxApp it works as expected. Dont know, maybe there is some Runtime-Thingy in one of the DLLs (Process Explorer shows s...
by Frank
Mon Aug 04, 2008 11:58 am
Forum: C++ Development
Topic: App hangs after wxApp::OnInit() returns false
Replies: 5
Views: 1087

App hangs after wxApp::OnInit() returns false

Hi wxForum, I have a strange problem. My apps hangs, if wxApp::OnInit() returns false. I have an wxSingleInstanceChecker, and my OnInit() returns false, when the process is already running, so that the new process ends itself. Trouble is, it does not. It creates no windows, but it hangs somewhere, I...
by Frank
Sun Jul 20, 2008 12:36 pm
Forum: C++ Development
Topic: try/catch
Replies: 5
Views: 973

Hi, wx calls the Function wxApp::OnExceptionInMainLoop() when it catches an exception (I think you must set some exceptions-blah in the setup.h, don't remember). Because there is no information in OnExceptionInMainLoop(), it is of course useless. So I just rethrow it: bool MyApp::OnExceptionInMainLo...
by Frank
Fri Jul 11, 2008 8:12 am
Forum: C++ Development
Topic: '\n' interpreted different ways
Replies: 9
Views: 1407

EVERY windows program can interpret \r\n, because almost every windows program writes \r\n.

The only thing, some windows programs not recognise is \n because, well, almost every windows program writes \r\n.
by Frank
Thu Jul 10, 2008 11:11 pm
Forum: C++ Development
Topic: '\n' interpreted different ways
Replies: 9
Views: 1407

Just use the standard C++ streams instead of wxFile.

They take care of the linefeends, no need to do it yourself. Write "\n", the standardlib will convert it automatically to "\r\n" on windows.
by Frank
Thu Jul 10, 2008 11:03 pm
Forum: C++ Development
Topic: Bind member function
Replies: 14
Views: 2964

It's not a Problem with boost::bind() (wich is BTW part of C++09, the draft will be ready in September). This should work: class X { gboolean checkTimer(gpointer data) { g_timeout_add(500, checkTimer, NULL); } } X a; boost::function<gboolean(gpointer)> func = boost::bind(&X:checkTimer, &a, _1); // f...
by Frank
Thu Jun 26, 2008 12:14 pm
Forum: C++ Development
Topic: How to get scrollbar size to reserve space in wxListCtrl?
Replies: 1
Views: 897

You can get the Value via wxSystemSettings::GetMetric().

See: http://docs.wxwidgets.org/stable/wx_wxs ... sgetmetric
by Frank
Mon Jun 23, 2008 10:21 am
Forum: General Development
Topic: catching the "X" event
Replies: 1
Views: 595

by Frank
Mon Jun 23, 2008 8:33 am
Forum: C++ Development
Topic: Displaying í and the other latin chars..how?
Replies: 7
Views: 1814

I don't know about Unix, but on Windows the Console has another Codepage than the GUI (437 or something).

So, a String that is perfectly fine in a GUI app will be garbage in the console.

I never used Unicode, so dunno if it matters in Unicode-Build.
by Frank
Sun Jun 22, 2008 11:22 am
Forum: C++ Development
Topic: wxFileOffset to long?
Replies: 1
Views: 534

What's strange about it? It's just a typedef to a long or a long long (depends on your platform).

So, all you have to do is this:

wxFileOffset offset = MyLongVariable;

I just tested it, works fine.
by Frank
Thu Jun 12, 2008 1:43 pm
Forum: C++ Development
Topic: Where to find a enhancement ListView with checkbox?
Replies: 11
Views: 1808

wxCheckListBox is part of wxWidgets.

It was in 2.6.3 alrady.

See:
http://docs.wxwidgets.org/2.6.3/wx_wxch ... ecklistbox
by Frank
Wed Jun 11, 2008 8:53 pm
Forum: C++ Development
Topic: Which Control To Use?
Replies: 3
Views: 1012

That are two controls. The top one is a wxTreeCtrl, the bottom one is a wxListCtrl. And a splitter in between.
by Frank
Wed Jun 04, 2008 3:41 pm
Forum: C++ Development
Topic: wxMenuItem colour change
Replies: 7
Views: 1328

Are you on windows? This is working on windows only.
by Frank
Wed Jun 04, 2008 3:37 pm
Forum: C++ Development
Topic: vector<wxString> problem ?
Replies: 8
Views: 1737

I think you problem is not the vector. vector is fine and tested by millions of uses in thousands of programs. Thing is, in debug mode the CRT performs a check of the memory structures on every new/delete. So the destructor of the vector is not the place where the corruption is caused. It's just the...
by Frank
Wed Jun 04, 2008 9:02 am
Forum: Component Writing
Topic: grouping Check Boxes
Replies: 5
Views: 1807

You can use a wxFlexGridSizer.

Set the rows/colums to 5 and 4. Then you just insert the checkboxes.