Search found 26 matches
- Thu Nov 27, 2008 7:12 am
- Forum: C++ Development
- Topic: Use of DECLARE_APP Macro
- Replies: 13
- Views: 3562
- Tue Jul 22, 2008 2:33 pm
- Forum: C++ Development
- Topic: Where to intercept Alt-Keypress to simulate mnemonics
- Replies: 1
- Views: 721
Where to intercept Alt-Keypress to simulate mnemonics
Hello, I have to extend a Notebook control (at present eranif's new Notebook control) to support mnemonics on tabs. But I am currently unable to intercept the corresponding keypresses to react to. So far I've tried wxEVT_CHAR event handlers in the topmost widget (the notebook page) and all panels an...
- Thu Apr 24, 2008 9:19 am
- Forum: C++ Development
- Topic: wxString ToDouble precision
- Replies: 5
- Views: 1238
You mean you didn't experience this problem on windows? Naturally it depends on the precision of the datatype itself. But mathematically, floating point numbers are stored in terms of Mantisse * 2 ^ Exponent (IEEE754) where both Mantisse and Exponent are integers of a limited width. So, to store 1.1...
- Thu Apr 24, 2008 7:52 am
- Forum: C++ Development
- Topic: wxString ToDouble precision
- Replies: 5
- Views: 1238
Actually this seems to be a plain c++ float/double precision issue: Actually, it's the C(++) floating point precision issue. Floating point numbers just are not precise. If you can't store 1.1 in a double, then a double simply can't represent 1.1 exactly. You will have to live with that or use a fi...
- Wed Apr 16, 2008 7:49 am
- Forum: C++ Development
- Topic: How to delete std::vector<wxString*> ?
- Replies: 7
- Views: 1996
- Fri Mar 14, 2008 10:40 am
- Forum: The Code Dump
- Topic: More flexible event callbacks
- Replies: 9
- Views: 5034
Flexible Event Callbacks revised
As I stated, I have evaluated the mechanism and I wanted to reduce the dependencies between wxEvtHandler and the actual handler functions even more. For example, if you handle wxEVT_COMMAND_MENU_SELECTED, there's really no need to specify that the argument is of type wxCommandEvent& in the Conne...
- Thu Mar 13, 2008 12:18 pm
- Forum: The Code Dump
- Topic: More flexible event callbacks
- Replies: 9
- Views: 5034
- Mon Dec 18, 2006 2:17 pm
- Forum: C++ Development
- Topic: Wierd bug with event tables on wxFrame derived classes
- Replies: 4
- Views: 1267
You had to make the OnExit method static because you are actually calling it when declaring the event table (notice the empty parens!). Since you are calling it without an object, it must be static for that piece of code to work. However, I guess you wanted EVT_MENU(EVENTID_MAINFRAME_EXIT,GhostFrame...
- Mon Dec 18, 2006 10:30 am
- Forum: C++ Development
- Topic: wxDateTime::Parseformat return less one month
- Replies: 3
- Views: 1244
- Mon Dec 18, 2006 8:21 am
- Forum: C++ Development
- Topic: about wxString and char[100]
- Replies: 1
- Views: 658
Probably your wxWidgets is compiled in Unicode mode. Then, wxString doesn't manage character arrays, but wide character arrays. You cannot pass narrow character arrays directly. Furthermore, the wxT macro is useful only for string literals. Two ways to make this work: // using wide characters direct...
- Fri Dec 15, 2006 5:55 pm
- Forum: C++ Development
- Topic: Dialogs in 2.8
- Replies: 5
- Views: 1711
- Sun Dec 10, 2006 10:51 pm
- Forum: C++ Development
- Topic: wxArray size_t or int, which one is it?
- Replies: 7
- Views: 1812
- Fri Dec 08, 2006 8:42 am
- Forum: C++ Development
- Topic: Access controls in child wxPanel
- Replies: 3
- Views: 1288
You should use a C++ style cast: wxTextCtrl* myTC = static_cast< wxTextCtrl* >(FindWindowById(ID_MySQLADDRESS)); // if you are _absolutely_ sure that FindWindowById(ID_MySQLADDRESS) will return a wxTextCtrl* if (myTC == 0) { /* nope, this control was not found */ } // or wxTextCtrl* myTC = dynamic_c...
- Thu Dec 07, 2006 8:41 pm
- Forum: C++ Development
- Topic: wxArray size_t or int, which one is it?
- Replies: 7
- Views: 1812
Since I'm interested, too, this still doesn't work out for item no. 3000000 for example. A solution could be defining the not_found-id as (size_t)-1 (or more conformant std::numeric_limits<size_t>::max()-1), which is the largest possible size_t. This would only render one possible index useless, not...
- Wed Dec 06, 2006 8:54 am
- Forum: C++ Development
- Topic: [wxString] problem when initializing
- Replies: 4
- Views: 1928
This will again only work if the character type is only one byte wide. In general, you're safest when you mark all literal strings with wxT(), since this works fine in both Unicode and ANSI modes. More precisely: A narrow character string in C++ is represented by the text within quotation marks. A w...