Search found 41 matches
- Tue Mar 06, 2018 1:07 pm
- Forum: C++ Development
- Topic: wxString performance
- Replies: 25
- Views: 6251
Re: wxString performance
You should never optimize a program without first profiling it. Without knowing where it is slow, you can spend too much time optimizing the wrong parts. And you should never optimize a program until users complain it's too slow. Instead, write the program to be easily understood. A professional pro...
- Wed Feb 28, 2018 5:32 pm
- Forum: C++ Development
- Topic: wxSashLayoutWindow 5 sashes
- Replies: 4
- Views: 1363
Re: wxSashLayoutWindow 5 sashes
I don't care which class to use as long I get the desired layout in the picture Both will look the same but behave differently. A wxSplitterWindow will divide a parent window into two subwindows with a control between them. When one grows, the other shrinks. wxSashWindow place controls on any or al...
- Wed Feb 28, 2018 4:05 pm
- Forum: C++ Development
- Topic: wxSashLayoutWindow 5 sashes
- Replies: 4
- Views: 1363
Re: wxSashLayoutWindow 5 sashes
Do you want to use wxSashWindow or wxSplitterWindow? The are completely different from each other. Most of the time, people would want wxSplitterWindow.
- Wed Feb 07, 2018 1:06 pm
- Forum: General Development
- Topic: Recommendation for c++ gui builder?
- Replies: 10
- Views: 11435
Re: Recommendation for c++ gui builder?
Hi, I use{d} wxGlade, but now I'm more or less can write simple layout by hand. Thank you. P.S.: I don't want to be kicked out for starting a flame war... P.S.: I don't want to be kicked out for starting a flame war... Too late :mrgreen: PS: I often go by hand too (as you said: when the layout is r...
- Sat Dec 16, 2017 1:52 pm
- Forum: C++ Development
- Topic: Best practice: Linking GUI to function code.
- Replies: 6
- Views: 2038
Re: Best practice: Linking GUI to function code.
The Document/View Framework was created to separate documents from views, although some might think it is overkill for a single list.
- Wed Dec 07, 2016 3:13 pm
- Forum: C++ Development
- Topic: dynamic #include?!
- Replies: 7
- Views: 1726
Re: dynamic #include?!
No but it has conditional compiling which works with `#includes. See https://gcc.gnu.org/onlinedocs/cpp/Ifdef.htmlONEEYEMAN wrote:C++ does not support conditional inclusion f the headers.
- Mon Oct 31, 2016 11:10 am
- Forum: Platform Related Issues
- Topic: how to set system clock
- Replies: 3
- Views: 1264
Re: how to set system clock
Your progam has to have root privileges to set the date & time. You may have to use the system function stime.
- Mon Sep 28, 2015 6:07 pm
- Forum: C++ Development
- Topic: wxImage not building correct image
- Replies: 4
- Views: 679
[solved] Re: wxImage not building correct image
OK, after some heavy thinking, this seems to work: void vwClock::UpdateDisplay ( int hr, int min, int sec, bool force ){ wxMemoryDC dc; // change hour-minute face when new minute if( sec == 0 || force ){ int hour_index = ( hr * 5 + min / 12 ) % 60; dc.SelectObject( m_hr_min_face ); dc.SetBackground(...
- Mon Sep 28, 2015 4:27 pm
- Forum: C++ Development
- Topic: wxImage not building correct image
- Replies: 4
- Views: 679
Re: wxImage not building correct image
The bitmaps have to have an alpha channel. If they didn't, there would be only one hand, not a bunch drawn over top of each other. So, you're saying I should use wxMemoryDC to store the composite images? Rotated bitmaps look ugly. That's why I have 60 rendered PNGs for each hand. And there are 3 han...
- Mon Sep 28, 2015 2:25 pm
- Forum: C++ Development
- Topic: wxImage not building correct image
- Replies: 4
- Views: 679
wxImage not building correct image
I'm trying to build a simple analog clock using PNG files for the hands. The problem I have is I cannot get wxImage to paste the layers together. It seems to use only the last wxImage, that of the second hand and reuses it each time. See attached Screenshot-sysmon.png The only thing I found close to...
- Sun Jul 19, 2015 5:08 pm
- Forum: Compiler / Linking / IDE Related
- Topic: Compiling AUI Doc/View example
- Replies: 4
- Views: 1451
Re: Compiling AUI Doc/View example
That could be a problem. I'm not sure my OS can handle an incompatible library.doublemax wrote:wxWidgets 3.1 and 2.8.12 are very different and not compatible
- Sun Jul 19, 2015 4:15 pm
- Forum: Compiler / Linking / IDE Related
- Topic: Compiling AUI Doc/View example
- Replies: 4
- Views: 1451
Re: Compiling AUI Doc/View example
Nope.T-Rex wrote:You probably forgot to install wxWidgets on your system.
Code: Select all
$ wx-config --version-full
2.8.12.1
- Sun Jul 19, 2015 2:41 pm
- Forum: Compiler / Linking / IDE Related
- Topic: Compiling AUI Doc/View example
- Replies: 4
- Views: 1451
Compiling AUI Doc/View example
I have cloned this repository: https://github.com/wxWidgets/wxWidgets/tree/master/samples/docview and compiled it: $ ./configure # lots of output $ make # more output, some warnings but compiled $ I then tried: $ ./utils/wxrc/wxrc ./utils/wxrc/wxrc: error while loading shared libraries: libwx_baseu_...
- Thu Jun 18, 2015 3:18 pm
- Forum: C++ Development
- Topic: Memory deallocation
- Replies: 10
- Views: 2182
Re: Memory deallocation
Permanent widgets should be allocated with `new`. Temporary ones can be allocated on the stack. Actually there are only two types of objects that can be created on the stack under certain circumstances: Modal dialogs and popup menus. What about wxString? There are a number of "widgets" th...
- Thu Jun 18, 2015 2:02 pm
- Forum: C++ Development
- Topic: Memory deallocation
- Replies: 10
- Views: 2182
Re: Memory deallocation
Those are allocated on the stack. If the allocation has the keyword `new`, it is allocated on the heap and must be explicitly freed. Otherwise, it is allocated on the stack and will be freed when the function returns. If I'm not mistaken, all that widgets were allocated using the keyword new , whic...