Search found 211 matches

by Frank
Fri May 30, 2008 11:20 am
Forum: General Development
Topic: Disable whole panel but one button
Replies: 2
Views: 1008

You have to iterate over all the controls and disable one by one. You can use wxWindow::GetChildren(): // I have not tested this void disableAllWindowsExceptOne (wxWindow* parent, wxWindow* except) { wxWindowList childs = parent->GetChildren(); // I use wxUSE_STL. Don't know how to iterate a wxList ...
by Frank
Thu May 29, 2008 6:36 pm
Forum: C++ Development
Topic: [undefined reference] deflat
Replies: 2
Views: 983

You need to add ZLib to your Project (libwxzlib.a in my MinGW compiled 2.8.7).
by Frank
Wed May 28, 2008 10:43 pm
Forum: C++ Development
Topic: Signal/Slot with message passing
Replies: 2
Views: 950

I did a similar thing by just implementing the command pattern (see design patterns: Command Pattern). By making the command class a tmplate (okay, some more, for 1 to 10 template-parameters), I only need one sigle command class, wich than gets the types of the parameters via template-types. So, if ...
by Frank
Tue May 27, 2008 11:00 pm
Forum: C++ Development
Topic: Calling an event by a literal
Replies: 5
Views: 1319

I would use a: typedef std::map<std::string, boost::function<whatever> > EventMap; EventMap MyEventMap; // Fill Event Map The String is the literal. The Function the function to call. Then, it's a simple EVentMap::iterator it = MyEventMap.find("My Event-Name"); if (it != MyEventMap.end()) it->second...
by Frank
Fri May 23, 2008 12:38 pm
Forum: General Development
Topic: Do any GUI builders support wxDataViewCtrl?
Replies: 3
Views: 1197

In wxFormBuilder you can write Plugins for whatever Control you need. Also, there is a "custom control", with wich you can insert the code for creation directly into the Builder. In DialogBlocks you can define your own controls (complete with events, flags and all). You find it in the settings dialog.
by Frank
Wed May 14, 2008 9:27 am
Forum: C++ Development
Topic: [wxBitmapButton] with label?
Replies: 3
Views: 696

Okay, here it is.

The Code is quite ugly, I wrote it years ago, when I was just starting with wx. But it still works.

Since I don't care about Unix, it uses Windows-Specific stuff like the UX-Theme-Manger and if I remeber right some Win-API-Calls. Don't know if it is of any use for porting to Unix.
by Frank
Wed May 14, 2008 8:32 am
Forum: C++ Development
Topic: [wxBitmapButton] with label?
Replies: 3
Views: 696

No there is no way in wx.

Personally I, like some others I heard of, wrote my own button class to get around this limitation.
by Frank
Sat Apr 26, 2008 12:22 pm
Forum: C++ Development
Topic: Vista problem to open url in external browser
Replies: 1
Views: 512

That's a Vista Bug.

The same thing happens if you type in the adress in Start/Run. Or doubleclicking a url-shortcut on your desktop.

No fault of your program.
by Frank
Sat Apr 19, 2008 12:27 am
Forum: C++ Development
Topic: terminate called without an active exception
Replies: 1
Views: 610

Since the compiler does not allow classes that don't overwrite the pure virtual functions of it's baseclass, I would think that it is impossible to call a pure virtual.

I saw that error too. It's been a while, but when I remember right, it had to do with some COM classes. TAPI if I remember right.
by Frank
Tue Apr 15, 2008 7:33 pm
Forum: General Development
Topic: Listening to an Event from another window
Replies: 3
Views: 816

Ooops, of course your're right :oops:
by Frank
Tue Apr 15, 2008 10:39 am
Forum: General Development
Topic: Listening to an Event from another window
Replies: 3
Views: 816

You can connect your Button to a Function of your Main-Window. When the button is clicked your mainwindow function gets called.

See wxWindow::Connect().
by Frank
Mon Apr 14, 2008 10:16 am
Forum: C++ Development
Topic: using connect with a template class
Replies: 4
Views: 910

Your class must derive from wxEventHandler.
by Frank
Sun Apr 13, 2008 6:51 pm
Forum: Open Discussion
Topic: Python and Multithreading
Replies: 0
Views: 815

Python and Multithreading

Hi, I looked at Python a few years back. I wanted to embed it into a Multithreaded Server. Because of the crappy handling of Multithreading (there was no chance for real multithreading, thanks to a dumb lock, that must be held), I've choosen Lua. Some years have passed, multicore is state of the art...
by Frank
Sun Apr 13, 2008 12:57 pm
Forum: Open Discussion
Topic: XML strangeness
Replies: 6
Views: 2052

Because it's wrong.

<node>""</node> is the string "" (the two quote characters), not Empty.

If you want a "" for whatever reason, just set the value of the node to "\"\"" from C++.
by Frank
Sat Apr 12, 2008 12:08 pm
Forum: Open Discussion
Topic: XML strangeness
Replies: 6
Views: 2052

You can't.

The XML-Standard (see w3c.org) makes no difference between <node/> and <node></node>. It's just syntactic sugar for the same thing: An empty node.

If you want do have a diffence like eg '' and null in a database, you have to encode it on your own.