Search found 449 matches

by mael15
Fri Apr 03, 2020 1:37 pm
Forum: C++ Development
Topic: more info on wxSOCKET_IOERR
Replies: 2
Views: 409

Re: more info on wxSOCKET_IOERR

hmmmm, seems to be as tricky as it appears?
by mael15
Fri Mar 20, 2020 2:53 pm
Forum: C++ Development
Topic: more info on wxSOCKET_IOERR
Replies: 2
Views: 409

more info on wxSOCKET_IOERR

hi everyone, I am getting unpredictable wxSOCKET_IOERR and struggle to get to the bottom of this. How can I get more information, i.e. was there a buffer problem? Which side of the TCP connection produced the error? Another thing: to reduce problems I started securing socket access by different thre...
by mael15
Thu Jan 30, 2020 2:45 pm
Forum: C++ Development
Topic: calculate screen pos -> pos on rotated wxBitmap
Replies: 2
Views: 273

calculate screen pos -> pos on rotated wxBitmap

I draw a rotated wxBitmap. Is there a function to calculate where on the rotated wxBitmap the mousePos is? Something to give the rotation parameters that transforms the position on screen to the position within the rotated bitmap? I think I have seen something like this a while ago but cannot find i...
by mael15
Wed Jan 29, 2020 3:46 pm
Forum: C++ Development
Topic: rotate a wxPanel
Replies: 9
Views: 614

Re: rotate a wxPanel

WPF is Microsoft's (not only) GUI library for Windows, available from .NET. It allows applying various transformations incl. rotation to the controls but all the controls are custom-drawn by the library, it does not use the native Win32 controls. I just used WPF as a rare GUI example where the cont...
by mael15
Wed Jan 29, 2020 7:52 am
Forum: C++ Development
Topic: rotate a wxPanel
Replies: 9
Views: 614

Re: rotate a wxPanel

Aren't things like this usually done with custom drawing (including e.g. WPF controls with transforms) instead of using native windows? I did not read this properly the first time. What do you mean by "wpf controls"? My approach would be to calculate if the mouse is over a painted button area on th...
by mael15
Wed Jan 29, 2020 7:48 am
Forum: C++ Development
Topic: rotate a wxPanel
Replies: 9
Views: 614

Re: rotate a wxPanel

thank you for your tip! while starting to implement a mouse sensitive bitmap with all the button images on it, I realized there is a performance advantage compared to having a lot of single buttons. It could happen in my case that I need to create and display >100 and that takes a while with wxPanel...
by mael15
Tue Jan 28, 2020 11:54 am
Forum: C++ Development
Topic: rotate a wxPanel
Replies: 9
Views: 614

Re: rotate a wxPanel

PB wrote:
Tue Jan 28, 2020 11:42 am
I understand that no one wants to re-invent a wxButton. But assuming I was not wrong, what is the alternative?
Yeah, I guess this might be the only way. Bummer.
by mael15
Tue Jan 28, 2020 11:32 am
Forum: C++ Development
Topic: rotate a wxPanel
Replies: 9
Views: 614

Re: rotate a wxPanel

A custom drawing would be possible of course, but it would be quite an effort to incorporate button feeling with mouseover and cursor change to show the user that a certain area is clickable.
by mael15
Tue Jan 28, 2020 10:52 am
Forum: C++ Development
Topic: rotate a wxPanel
Replies: 9
Views: 614

rotate a wxPanel

With the help of this wonderful forum I managed to draw rotated stuff on a wxGCDC, which is wonderful. Now I have custom wxPanel "buttons" to select parts of an image, in this case the arrow buttons can be clicked to select a row/column of circles: rotatePanel.jpg The image can be rotated, as seen h...
by mael15
Thu Jan 16, 2020 1:55 pm
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 849

Re: wxSpinCtrl Enter should do what Tab does

PB wrote:
Wed Jan 15, 2020 12:05 pm
On MSW it works (the control is a generic one combining wxTextCtrl and wxSpinCtrl) but it may not work elsewhere.
That is okay, my program will always be limited to windows.
Really helpful answer, thank you! I also learned something new about how to use templates. =D> :D
by mael15
Wed Jan 15, 2020 9:47 am
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 849

Re: wxSpinCtrl Enter should do what Tab does

A little follow up question: Can I somehow put this in a class that a lot of different spin controls can inherit from? class DECLDIR_CONF spinCtrlBasis { public: spinCtrlBasis(int winId){ getEvtHandler()->Connect(winId, wxEVT_TEXT_ENTER, wxCommandEventHandler(spinCtrlBasis::onEnterKey)); getEvtHandl...
by mael15
Wed Jan 15, 2020 7:42 am
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 849

Re: wxSpinCtrl Enter should do what Tab does

doublemax wrote:
Tue Jan 14, 2020 8:39 pm
delayed using CallAfter
unfortunately it still does nothing.
PB wrote:
Tue Jan 14, 2020 8:39 pm
void OnSpinCtrlTextEnter(wxCommandEvent& evt)
{
wxWindow* win = dynamic_cast<wxWindow*>(evt.GetEventObject());

win->Navigate();
}
};
YES! Thank you!
by mael15
Tue Jan 14, 2020 8:08 pm
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 849

Re: wxSpinCtrl Enter should do what Tab does

doublemax wrote:
Tue Jan 14, 2020 7:59 pm
Without trying, i'd say: Catch wxEVT_TEXT_ENTER event and call Navigate() in the event handler.
That sounds perfect and was what I was looking for, unfortunately nothing happens.
by mael15
Tue Jan 14, 2020 7:50 pm
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 849

Re: wxSpinCtrl Enter should do what Tab does

I have it in a wxPanel.
Nothing happens when I press Enter.
wxWidgets 3.1.3 on Windows 10 Pro with Visual Studio v142 build tools (10.0.18362.0).
by mael15
Tue Jan 14, 2020 5:41 pm
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 849

wxSpinCtrl Enter should do what Tab does

I have a wxSpinCtrl and want to leave the control when the user presses Enter, just like what happens when the user pressed Tab. The wxEVT_COMMAND_SPINCTRL_UPDATED should be triggered and the next control selected.
I am surprised that seems to be difficult. How can I achieve this?