Search found 7 matches

by sw
Sat Aug 24, 2019 9:35 am
Forum: C++ Development
Topic: Thread completion event not being picked up in handler
Replies: 5
Views: 104

Re: Thread completion event not being picked up in handler

Oh cool, that worked! Thank you!

Do you perhaps know why it works with Bind and not with the macro (EVT_THREAD)?
by sw
Sat Aug 24, 2019 8:13 am
Forum: C++ Development
Topic: Thread completion event not being picked up in handler
Replies: 5
Views: 104

Re: Thread completion event not being picked up in handler

That unfortunately had no effect... The thread completion is still not being invoked. Just as an update, I did modify the Entry function to be like so: wxThread::ExitCode CheckForUpdateThread::Entry() { std::string eventString = ""; wxLogDebug("Entered thread"); if (TestDestroy()) { return nullptr; ...
by sw
Sat Aug 24, 2019 7:13 am
Forum: C++ Development
Topic: Thread completion event not being picked up in handler
Replies: 5
Views: 104

Thread completion event not being picked up in handler

Hi all, I am running a thread from a dialog which is making a GET request to check for updates. So I followed the guide here https://docs.wxwidgets.org/trunk/classwx_thread.html . The only difference from there is that the handler had to be changed from EVT_COMMAND to EVT_THREAD. I get a compilation...
by sw
Wed Jul 31, 2019 1:17 pm
Forum: C++ Development
Topic: Unresolved external symbol with wxDECLARE_EVENT
Replies: 5
Views: 101

Re: Unresolved external symbol with wxDECLARE_EVENT

I'm so embarrassed, but I figured it out. I'm using namespaces in my application and I put the wxDEFINE_EVENT inside the namespace of the dialog source file. The frame is also in a namespace, but in a different one hence why the linker was struggling to find the event. Moving it out of the namespace...
by sw
Wed Jul 31, 2019 11:53 am
Forum: C++ Development
Topic: Unresolved external symbol with wxDECLARE_EVENT
Replies: 5
Views: 101

Re: Unresolved external symbol with wxDECLARE_EVENT

In the dialog: wxCommandEvent taskInsertedEvent(TASK_INSERTED); wxPostEvent(pParent, taskInsertedEvent); where pParent is a pointer to the frame class. In the frame: wxBEGIN_EVENT_TABLE(MainFrame, wxFrame) ... EVT_COMMAND(wxID_ANY, TASK_INSERTED, MainFrame::OnTaskInserted) ... wxEND_EVENT_TABLE() vo...
by sw
Wed Jul 31, 2019 9:08 am
Forum: C++ Development
Topic: Unresolved external symbol with wxDECLARE_EVENT
Replies: 5
Views: 101

Unresolved external symbol with wxDECLARE_EVENT

Hi all, I have searched through the forums to see if anyone has experienced this issue, but I have not found anything. I was following the wiki page for creating custom events https://wiki.wxwidgets.org/Custom_Events#Creating_a_Custom_Event_-_Method_4 I am trying to post a event from a dialog to the...
by sw
Sat Mar 16, 2019 8:19 pm
Forum: Compiler / Linking / IDE Related
Topic: Unable to use wxTimePickerCtrl
Replies: 1
Views: 165

Unable to use wxTimePickerCtrl

Hello everyone! I am trying to use the wxTimePickerCtrl in my program and I keep getting unresolved external symbol on everything involving that class. I get LNK2019 and LNK2001 . I am using MSVC with vcpkg and CMake. I installed wxWidgets using vcpkg and the moment I try to instantiate the class I ...