Search found 85 matches

by bsenftner
Mon Jun 24, 2019 5:11 pm
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 1591

Re: events, secondary threads & app remote control

I believe I am in a NIH (not invented here) catch-22. My CTO does not use any custom events in his wxWidgets projects; he simply uses wxEVT_TEXT for all customized event situations, and then uses Connect() with unique IDs to bind different function pointers to the unique IDs. He has success with oth...
by bsenftner
Mon Jun 24, 2019 3:36 pm
Forum: C++ Development
Topic: AddPendingEvent() documentation is wrong
Replies: 3
Views: 632

AddPendingEvent() documentation is wrong

This is fairly confusing: The documentation around AddPendingEvent() says: Add an event to be processed later: notice that this function is not safe to call from threads other than main, use QueueEvent() Yet, AddPendingEvent() is literally: virtual void AddPendingEvent(const wxEvent& event) { //...
by bsenftner
Mon Jun 24, 2019 12:53 pm
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 1591

Re: events, secondary threads & app remote control

Doublemax, The definition of EVT_Command is #define EVT_COMMAND(winid, event, func) \ wx__DECLARE_EVT1(event, winid, wxCommandEventHandler(func)) While EVT_THREAD is: #define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func)) So it looks like my use of EVT_THREAD as ...
by bsenftner
Sat Jun 22, 2019 5:09 am
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 1591

Re: events, secondary threads & app remote control

Hmmm... something is not right. I tried a small test case where I converted one event used by communication between threads from using a wxCommandEvent to a wxThreadEvent. However, the event handler is not called when a wxThreadEvent, but is called when a wxCommandEvent. In my application I have a s...
by bsenftner
Sat Jun 22, 2019 2:44 am
Forum: C++ Development
Topic: Threaded Job/Queue Manager getting stuck?
Replies: 8
Views: 1335

Re: Threaded Job/Queue Manager getting stuck?

Should the events be wxThreadEvents, and then passed with wxQueueEvent()?

Also, checking event.h, SetString() is not using clone():

void SetString(const wxString& s) { m_cmdString = s; }
by bsenftner
Sat Jun 22, 2019 2:41 am
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 1591

Re: events, secondary threads & app remote control

Thank you for this information. So in places where data passes between threads, a wxThreadEvent should be used. Most important, strings should be cloned. In the situation where one creates an event to send, either a wxCommandEvent or wxThreadEvent, if the event is going into wxQueueEvent() then the ...
by bsenftner
Sat Jun 22, 2019 1:19 am
Forum: C++ Development
Topic: events, secondary threads & app remote control
Replies: 10
Views: 1591

events, secondary threads & app remote control

Let's say one has a multi-threaded wxWidgets app, with multiple windows, dialogs, toolbars with icon/menu controls, panels and so forth. These are constructed in the conventional manner with wxCommandEvents as the event type used to pass requests around the application. All GUI operations occur in t...
by bsenftner
Fri Jun 21, 2019 11:49 pm
Forum: C++ Development
Topic: Threaded Job/Queue Manager getting stuck?
Replies: 8
Views: 1335

Re: Threaded Job/Queue Manager getting stuck?

Can anyone confirm the following? The complete Job/Queue Manager example provided by https://wiki.wxwidgets.org/Inter-Thread_and_Inter-Process_communication is actually thread unsafe because it uses wxCommandEvents to pass strings between threads? Furthermore, the Queue class's Report() method uses ...
by bsenftner
Wed Jun 19, 2019 1:29 am
Forum: C++ Development
Topic: Threaded Job/Queue Manager getting stuck?
Replies: 8
Views: 1335

Threaded Job/Queue Manager getting stuck?

Developing in C++ via Visual Studio 2015, using the latest wxWidgets, deploying to recent versions of Windows... I have a multi-window application, where each window is wxFrame based, and has a background thread for exporting data. The background thread is implemented after the full example given en...
by bsenftner
Thu Apr 11, 2019 12:13 am
Forum: C++ Development
Topic: how to hide a complex wxDialog's slow first render?
Replies: 2
Views: 741

how to hide a complex wxDialog's slow first render?

Working in Win10, Visual Studio 2015 C++; deploying to Win7+ flavors of Windows and a few Linux. Using wxWidgets 3.1.2. I have a complex wxDialog with 28 wxStaticBoxSizers holding a checkbox, textCtrl and button each. Plus a separate single wxComboBox on the dialog. These 28 wxStaticBoxSizers are th...
by bsenftner
Sun Dec 09, 2018 3:05 pm
Forum: C++ Development
Topic: Are there tests for alphanumeric but including extended latin unicode?
Replies: 3
Views: 831

Re: Are there tests for alphanumeric but including extended latin unicode?

No answers yet, but for interested people: * Where American English only has upper case and lower case, extended Latin also has "title case", a 2nd form of upper case reserved for use in formal names? * Can anyone explain what "fold case" is? Is that a 4th form of a character, li...
by bsenftner
Sun Dec 09, 2018 1:36 am
Forum: C++ Development
Topic: Are there tests for alphanumeric but including extended latin unicode?
Replies: 3
Views: 831

Are there tests for alphanumeric but including extended latin unicode?

I have an international application, and I am laying in the unicode handling now. The application has people and place locations in wxStrings, and "people list" names, as well as "location list" names. I would like to restrict these end-user created "names" to be "...
by bsenftner
Mon Nov 12, 2018 8:36 pm
Forum: C++ Development
Topic: if programatically moving/resizings windows, must one send move/size events manually?
Replies: 0
Views: 7014

if programatically moving/resizings windows, must one send move/size events manually?

I have a multi-window application, with the intention of end-users placing windows inside multiple displays attached to the same system. Such users sometimes have rotating displays that switch between portrait and landscape layouts, and users may remove a display between launches of our application....
by bsenftner
Wed Aug 22, 2018 2:57 am
Forum: Platform Related Issues
Topic: Can't locate wxWidgets app with EnumWindows()/EnumDesktopWindows()
Replies: 1
Views: 1032

Can't locate wxWidgets app with EnumWindows()/EnumDesktopWindows()

I have a wxWidgets application I want to periodically check is running. I believe the method to do this on Windows is with a Service. I am using a minimally modified version of the "A basic Windows service in C++" sample, located here: https://code.msdn.microsoft.com/windowsapps/CppWindows...
by bsenftner
Tue Apr 24, 2018 5:18 pm
Forum: C++ Development
Topic: trying to calc column cell clicked in wxListCtrl
Replies: 9
Views: 1670

Re: trying to calc column cell clicked in wxListCtrl

The program is not marked as DPI Aware. I could continue here, but I've spent too much time trying to work around this (seemingly odd) limitation of wxListCtrl. I should have used a wxGrid. Rather than start learning about DPI Awareness and pursuing this unsupported feature, I'm just going to bail o...