Search found 430 matches

by mael15
Fri Jul 03, 2020 12:17 pm
Forum: C++ Development
Topic: wxSpinCtrlDouble not wrapping correctly?
Replies: 6
Views: 183

Re: wxSpinCtrlDouble not wrapping correctly?

thank you! so I guess there is no easy fix?
by mael15
Mon Jun 29, 2020 11:03 am
Forum: C++ Development
Topic: wxSpinCtrlDouble not wrapping correctly?
Replies: 6
Views: 183

wxSpinCtrlDouble not wrapping correctly?

Hi, I have this simple wxSpinCtrlDouble: wxSpinCtrlDouble* rotSpin = new wxSpinCtrlDouble(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(80, -1), wxSP_WRAP, 0.0, 359.9, 0, 0.1); rotSpin->SetDigits(1); When wrapping downwards using the arrow buttons on wxMSW: 0.2, 0.1, 0.0. 359.9, 359.8 eve...
by mael15
Sun Jun 28, 2020 11:17 am
Forum: C++ Development
Topic: cannot catch key event in wxSpinCtrlDouble
Replies: 2
Views: 74

Re: cannot catch key event in wxSpinCtrlDouble

works perfectly, thanx! =D>
by mael15
Sun Jun 28, 2020 10:51 am
Forum: C++ Development
Topic: cannot catch key event in wxSpinCtrlDouble
Replies: 2
Views: 74

cannot catch key event in wxSpinCtrlDouble

I need to catch the Escape key and assign a specific action in a wxSpinCtrlDouble. Strangly, what works in a wxSpinCtrl does not in a wxSpinCtrlDouble: class escTest : public wxSpinCtrl/*Double*/ { public: escTest(wxWindow *par) : wxSpinCtrl/*Double*/(par, wxID_ANY){ Bind(wxEVT_KEY_DOWN, wxKeyEventH...
by mael15
Thu Jun 18, 2020 5:08 pm
Forum: C++ Development
Topic: how to remove the file to trash?
Replies: 12
Views: 2237

Re: how to remove the file to trash?

ONEEYEMAN wrote:
Thu Jun 18, 2020 4:58 pm
Hi,
The pull request PB referenced takes care of all 3 major platforms.
Give it a shot and see what happens.

Thank you.
thanx, I only need it for windows but hope it will be part of the next regular release. Very important function imho. I copy and pasted the msw part.
by mael15
Thu Jun 18, 2020 2:16 pm
Forum: C++ Development
Topic: how to remove the file to trash?
Replies: 12
Views: 2237

Re: how to remove the file to trash?

perfect, thanx!
by mael15
Thu Jun 18, 2020 11:31 am
Forum: C++ Development
Topic: how to remove the file to trash?
Replies: 12
Views: 2237

Re: how to remove the file to trash?

Is this still the same on Windows 10?
by mael15
Fri Apr 24, 2020 8:49 am
Forum: C++ Development
Topic: double buffering makes spin button disappear
Replies: 2
Views: 140

Re: double buffering makes spin button disappear

Maybe is it related to this unsolved bug https://trac.wxwidgets.org/ticket/18231#comment:3 Are you doing anything in the spin event handler? That is probably it. I am not doing anything in the spin event handler, I was just trying to fresh the wxSpinCtrl to make the arrow appear again, but it doesn...
by mael15
Fri Apr 24, 2020 7:04 am
Forum: C++ Development
Topic: double buffering makes spin button disappear
Replies: 2
Views: 140

double buffering makes spin button disappear

Hello everyone, I have a little visual problem. As you can see in this minimal example, when one clicks the upper button on a wxSpinCtrl, the lower button under the cursor disappears and stays gone if one moves the mouse to the right afterwards. This is because I use SetDoubleBuffered(true) to avoid...
by mael15
Tue Apr 21, 2020 9:04 am
Forum: C++ Development
Topic: wxPanel on another panel, repaint using a lot CPU
Replies: 14
Views: 421

Re: wxPanel on another panel, repaint using a lot CPU

Regarding the CPU utilization: I believe that on modern CPUs just the percentage can be deceiving, as the CPU underclocks when not fully utilized. For example, my desktop AMD CPU underclocks to < 2 GHz from its default 3.4. The current speed can be seen on the Performance tab of the Task Manager. T...
by mael15
Tue Apr 21, 2020 6:18 am
Forum: C++ Development
Topic: wxPanel on another panel, repaint using a lot CPU
Replies: 14
Views: 421

Re: wxPanel on another panel, repaint using a lot CPU

Hmm, the CPU load on my system is around 1-2%, no matter how fast i move the mouse. From your posts i would have expected something much worse ;) Hmmmmmmm, when I maximize the frame on a full hd display and move the mouse around it goes up to 8-9% on my i7 3.5GHz 16GB ram system. At least when not ...
by mael15
Mon Apr 20, 2020 7:42 pm
Forum: C++ Development
Topic: wxPanel on another panel, repaint using a lot CPU
Replies: 14
Views: 421

Re: wxPanel on another panel, repaint using a lot CPU

wxBufferedPaintDC bpdc(this); bpdc.SetDeviceClippingRegion(GetUpdateRegion()); Here you should definitely use the wxBufferedPaintDC overload that takes a wxBitmap &buffer as paramter. This buffer bitmap should be static and only get (re-) created when the client size changes. This should save some ...
by mael15
Mon Apr 20, 2020 9:22 am
Forum: C++ Development
Topic: wxPanel on another panel, repaint using a lot CPU
Replies: 14
Views: 421

Re: wxPanel on another panel, repaint using a lot CPU

I meant a real, complete wxFrame, an independent toplevel window for the tooltip, that you position at the correct coordinates. Cool idea, tried it, but it leads to ~20% higher cpu load than wxPanel. Only with wxFrame it is not the wxPaintEvent of the underlying panel but SetPosition and SetSizeHin...
by mael15
Mon Apr 20, 2020 7:00 am
Forum: C++ Development
Topic: wxPanel on another panel, repaint using a lot CPU
Replies: 14
Views: 421

Re: wxPanel on another panel, repaint using a lot CPU

Are you drawing individual circles? The biggest part of cpu usage comes from wxDc::DrawBitmap on a wxBufferedPaintDC. The circles are already painted on a wxBitmap earlier. Additionally, you can update only the "dirty" rectangles. Check the code snippet using GetUpdateRegion() from here: https://do...
by mael15
Sun Apr 19, 2020 8:38 am
Forum: C++ Development
Topic: wxPanel on another panel, repaint using a lot CPU
Replies: 14
Views: 421

Re: wxPanel on another panel, repaint using a lot CPU

There must be drawing issue somewhere. Can I make drawing faster (less CPU hungry) by somehow not having to draw the whole background on every little mouse movement? Maybe using https://docs.wxwidgets.org/3.1.2/classwx_d_c_clipper.html ? Also, are you sure you cannot use a wx(Rich)ToolTip instead o...