Search found 457 matches

by mael15
Tue Mar 02, 2021 10:41 am
Forum: C++ Development
Topic: wxSocketClient establish connection
Replies: 5
Views: 116

Re: wxSocketClient establish connection

good idea! this worked and I found out that the device sometimes needs longer to connect the socket. i used to have WaitOnConnect(2) and that sometimes was too little time. what bugs me is that it might need up to 7 seconds per socket and i have 2 sockets per device and potentially 2 devices. can i ...
by mael15
Mon Mar 01, 2021 9:33 am
Forum: C++ Development
Topic: wxSocketClient establish connection
Replies: 5
Views: 116

Re: wxSocketClient establish connection

ONEEYEMAN wrote:
Sun Feb 28, 2021 5:58 pm
Hi,
Did you look at the sample?

Thank you.
yes, it all simply works in the sample, probably because it also has control over the server. That is not the case with me, so i guess my problem has to do with some non wxWidgets socket implementation in the device.
by mael15
Sun Feb 28, 2021 5:04 pm
Forum: C++ Development
Topic: reorder wxTreeCtrl (drag in spaces between nodes)
Replies: 5
Views: 1795

Re: reorder wxTreeCtrl (drag in spaces between nodes)

i am happy that it could help someone! i have updated it myself since then and am still using it. i hope something like this will be part of wxwidgets someday. O:)
by mael15
Sun Feb 28, 2021 5:02 pm
Forum: C++ Development
Topic: wxSocketClient establish connection
Replies: 5
Views: 116

wxSocketClient establish connection

hi everyone, so this basically works, it just sometimes needs a second run through to be successful. can I improve it? wxIPV4address addrSett; addrSett.Hostname(wxString::Format(wxT("192.168.5.%i"), getLastIpNum())); addrSett.Service(wxString::Format(wxT("%i"), portNr)); bool makeConn = sock->Connec...
by mael15
Fri Jan 29, 2021 5:46 pm
Forum: C++ Development
Topic: visual on/off bitmap
Replies: 2
Views: 130

visual on/off bitmap

I everyone! I want to have some kind of traffic light showing the state of a device connected to my app with either red or green light. I thought about some thing like a mouseOver wxBitmap, only that I control the state and not the mouse. Or just rebuild the whole window and use the other bitmap whe...
by mael15
Tue Jan 26, 2021 8:01 pm
Forum: C++ Development
Topic: wxPoint or wxRealPoint as function parameter
Replies: 2
Views: 117

wxPoint or wxRealPoint as function parameter

I have two functions with different signatures void func1(wxPoint pnt) { OutputDebugString(wxT("wxPoint\n")); } void func1(wxRealPoint pnt) { OutputDebugString(wxT("wxRealPoint\n")); } wxPoint pInt(1, 1); wxRealPoint pDbl(2.0, 2.0); bool choice = true; func1(choice ? pDbl : pInt); No matter what "ch...
by mael15
Sun Jan 03, 2021 5:55 pm
Forum: C++ Development
Topic: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible
Replies: 6
Views: 304

Re: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

thank you all, then I will use 0 as a minimum and check in every new release if this is fixed.
by mael15
Tue Dec 29, 2020 12:13 pm
Forum: C++ Development
Topic: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible
Replies: 6
Views: 304

wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Weird thing with wxSpinCtrlDouble, a minimum of i.e. 5 makes it impossible to manually enter any value starting with 1/2/3/4. wxSpinCtrlDouble *dblTest = new wxSpinCtrlDouble(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 5, 50); It works fine with wxSpinCtrl. Can ...
by mael15
Thu Oct 08, 2020 6:52 am
Forum: C++ Development
Topic: mouseOver lines on wxBitmap
Replies: 5
Views: 402

Re: mouseOver lines on wxBitmap

After a look into the sources, it seems that at least under Windows there's dedicated platform specific code that creates a region from a polygon without rendering it into a bitmap. So it's possible that at least under Windows a wxRegion can be both small and fast. I didn't make any performance tes...
by mael15
Tue Oct 06, 2020 1:45 pm
Forum: C++ Development
Topic: mouseOver lines on wxBitmap
Replies: 5
Views: 402

Re: mouseOver lines on wxBitmap

Sounds good, thanx! I would say there will be max 4000 lines. You think wxRegion is much slower than wxRect? To use both like you suggested, I would have to fill and loop at least two vectors. I would tend to only use wxRegion, what do you think? A nice pre test would be if the mouse is between the ...
by mael15
Tue Oct 06, 2020 12:55 pm
Forum: C++ Development
Topic: mouseOver lines on wxBitmap
Replies: 5
Views: 402

mouseOver lines on wxBitmap

Hi everyone! I have an image of a cogwheel in my app that the user can zoom in: zahnradLinien.jpg I want to enable the user to click and select one of these lines. What would be the best way? I thought about saving a std::vector of the wxRect around each line during the paint process and loop the mo...
by mael15
Tue Aug 25, 2020 8:47 am
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 274

Re: changing a wxLocale object also changes wxFileDialog language

what part of my code has this global effect to change the wxFileDialog language? I thought I only change my documentationLocale?
by mael15
Mon Aug 24, 2020 6:21 pm
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 274

Re: changing a wxLocale object also changes wxFileDialog language

The language of the native dialogs is tighly bound to the locale of the application, i don't think there is anything you can do about it. Can't you change the locale only during the generation of the PDFs and switch back afterwards? switching back would have to take place often because I also have ...
by mael15
Mon Aug 24, 2020 12:55 pm
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 274

changing a wxLocale object also changes wxFileDialog language

My program can create pdfs in different languages. I store the selected language in a wxLocale *documentationLocale object and change it with this code: bool wxTranslationHelperCustom::applyNewDocuLanguage(wxLanguage selLang) { if (GetDocuLocale() && (wxLanguage)GetDocuLocale()->GetLanguage() == sel...
by mael15
Fri Aug 21, 2020 1:01 pm
Forum: C++ Development
Topic: Button held down
Replies: 5
Views: 1476

Re: Button held down

I there still no easy way to repeat a function call as long as the user holds down the mouse button? Still have to use a wxTimer?