Search found 211 matches

by Frank
Wed Dec 09, 2009 10:40 pm
Forum: Open Discussion
Topic: why doesnt Wxwidgets work with data types like Ms .net ?
Replies: 9
Views: 3155

Also, with wx 2.8 (and before, I use this since 2.5) you can use wxUSE_STL (or something like that) in your Setup.h. WX then derives wxString from std::string. Wich means, in this case, wxString IS a std::string. I use this for years now wihtout any trouble. In my Code I use std::string only. When c...
by Frank
Thu Oct 15, 2009 10:49 am
Forum: Platform Related Issues
Topic: Windows 7
Replies: 2
Views: 612

There's nothing special about Windows 7. It's just Vista in new clothes.

If it works on Vista, it works on Windows 7 too. I tested it a few weeks, all worked fine. No problems with wx or any other part of my app.
by Frank
Sun Sep 27, 2009 9:18 pm
Forum: C++ Development
Topic: wxDialog ctor: C++ member initialization vs. Create()
Replies: 5
Views: 796

DialogBlocks generates "C with classes" not C++.

If you wan't good, clean code, don't use DialogBlocks.
by Frank
Wed Sep 16, 2009 8:25 am
Forum: C++ Development
Topic: Control available similar to wxFormBuilder?
Replies: 6
Views: 1035

Do you mean the wxPropertyGrid?

If so, have a look at http://wxpropgrid.sourceforge.net/cgi-bin/index
by Frank
Mon Sep 14, 2009 7:38 pm
Forum: C++ Development
Topic: Fifo-Class?
Replies: 3
Views: 540

Since an array has to copy all it's elements when the first element is removed, it's a very poor solution.

Why would you use a wx class anyway, when c++ already has classes for this (eg std::queue)?
by Frank
Wed Sep 09, 2009 1:22 pm
Forum: C++ Development
Topic: Possible to create a class to statically save settings?
Replies: 8
Views: 1040

Please notice that a crash is different from a normal program exit. Upon normal exit, the instance would be destructed, but in a crash it wouldn't.
Yes, you are right, of course. Sorry.
by Frank
Wed Sep 09, 2009 9:51 am
Forum: General Development
Topic: Boost Threads & WxWidgets
Replies: 5
Views: 1460

If it's a memberfunction your're calling, you need to take into consideration that a member needs the pointer to it's instance.

Try this:

boost::thread athread(boost::bind(&TheProject::thefunction, ptrToInstance, thevalue));

ptrToInstance is the this-pointer from the class
by Frank
Wed Sep 09, 2009 9:45 am
Forum: C++ Development
Topic: Possible to create a class to statically save settings?
Replies: 8
Views: 1040

Which means, if you crash, your users data is lost. Which I personally find unacceptable. The compiler destroys all static objects on program termination. So, if you make your GetInctance() correctly, your object will be destroyed. Like so: MyClass& MyClass::GetInstance () { static MyClass instance;...
by Frank
Sun Sep 06, 2009 7:37 am
Forum: C++ Development
Topic: Possible to create a class to statically save settings?
Replies: 8
Views: 1040

Of course, why should it not.

Just create a singleton (->google). It's quite easy. If your're multithreaded don't forget to serialize.
by Frank
Tue Aug 11, 2009 1:15 pm
Forum: C++ Development
Topic: Pointer to function
Replies: 6
Views: 664

Of course you can. void (MyClass::*PtrToMember) (); PtrToMember = &MyClass::MyFunc; If you have to give a Non-Member-Pointer as a parameter to a function, but only have a Member-Function, use boost::bind (or, with C++0x, std::bind). Like so: MyFuncThatWantsPlainFunctionPtr(boost::bind(&MyClass::MyFu...
by Frank
Mon Aug 03, 2009 10:38 am
Forum: C++ Development
Topic: Difference between erase and paint event
Replies: 2
Views: 497

The erase event is fired when you should erase the contents of your window (eg, fill it with it's background colour). The Paint event is fired when you should repaint the contents of your windows. Why there are two events for this? I don't know. I overwrite the erase event to do nothing in most case...
by Frank
Sun Aug 02, 2009 2:55 pm
Forum: Component Writing
Topic: Column-Component like in a wxListCtrl without list
Replies: 10
Views: 3142

I wrote my own header control too. In my case it is one simple window. I don't use distinct windows for every column, nor are the separators own windows. It is way to simple to check if the mouse is over a column (wich can be dragged around too in my control, to change their order) or a separator to...
by Frank
Fri Jul 10, 2009 1:33 pm
Forum: C++ Development
Topic: Raise() doesn't work reliably
Replies: 6
Views: 902

That's a windows feature to stop annoying programs to put themselves in the foreground wihtout being asked to do so.

Instead the taskbarbutton flashes.

It's not your programs fault. It's a windows thingy.
by Frank
Mon Jul 06, 2009 11:17 pm
Forum: C++ Development
Topic: wxExecute on Vista
Replies: 1
Views: 512

If a prgram could just start itself with admin rights, the whole point of admin rights where pointles. The malwareprogrammers would be in heaven... But I think there is a way to tell you application that it needs admin rights. If you google for Manifest and Elevation you should come up with somethig...
by Frank
Fri Jul 03, 2009 7:32 pm
Forum: C++ Development
Topic: Custom Event
Replies: 6
Views: 932

You don't need a Copyconstructor. The Default Copy-Ctor, wich the compiler creates for you, calls the Copy-Ctor for everey Member. The Copy-CTor for boost::any does just fine. No need to implement your own. Your problem is, you posting a pointer to a local object. After your function ends, this poin...