Search found 1738 matches

by PB
Mon Nov 19, 2018 6:35 pm
Forum: C++ Development
Topic: wxThreadEvent::SetExtraLong in 64bit [SOLVED]
Replies: 8
Views: 73

Re: wxThreadEvent::SetExtraLong in 64bit [SOLVED]

(I assume it is your code that crashes and not my example) Well, it would seem that you ran into afore-mentioned MT issues. Hard to say without knowing more. But if the method you use now works (and you are reasonably sure it is not masking an actual issue), I guess it's OK. Edit: FWIW, this seems t...
by PB
Mon Nov 19, 2018 5:19 pm
Forum: C++ Development
Topic: wxThreadEvent::SetExtraLong in 64bit [SOLVED]
Replies: 8
Views: 73

Re: wxThreadEvent::SetExtraLong in 64bit [SOLVED]

Mhm, still seems to work (as in compiles and runs without a crash with the simple code using no actual threads) for me even with wxImage. I would imagine that as long as you store just a pointer, there should be no issue with wxAny regardless of actual class members (assuming there is not an include...
by PB
Mon Nov 19, 2018 2:02 pm
Forum: C++ Development
Topic: wxThreadEvent::SetExtraLong in 64bit [SOLVED]
Replies: 8
Views: 73

Re: wxThreadEvent::SetExtraLong in 64bit [SOLVED]

Mhm, this builds and runs just fine (MSVC 2017, wx 3.1.2) #include <wx/wx.h> #include <wx/thread.h> class CustomPayload { public: CustomPayload(const wxString& name, int level) : m_name(name), m_level(level) {} wxString GetName() const { return m_name; } int GetLevel() const { return m_level; } ...
by PB
Mon Nov 19, 2018 1:34 pm
Forum: C++ Development
Topic: wxThreadEvent::SetExtraLong in 64bit [SOLVED]
Replies: 8
Views: 73

Re: wxThreadEvent::SetExtraLong in 64bit [SOLVED]

Wouldn't it be simpler to set the payload like this CustomPayload* payload = new CustomPayload(); wxThreadEvent *evt = new wxThreadEvent(); evt->SetPayload(payload); wxQueueEvent(threadEventTarget, evt); and in the event handler do CustomPayload* payload = evt.GetPayload<CustomPayload*>(); // do stu...
by PB
Thu Nov 08, 2018 1:19 pm
Forum: C++ Development
Topic: How to start a new wxWidgets component project!? [SOLVED]
Replies: 3
Views: 145

Re: How to start a new wxWidgets component project!? [SOLVED]

I know that my question is a little bit awkward, but I need to know from you (wxWidgets developers and maintainers) what do you use as tools, so my code will be uniform with wxWidgets code. AFAIK, none of the core developers frequent this forum, you can contact them in the wx-users mailing list or ...
by PB
Thu Nov 08, 2018 6:44 am
Forum: General Development
Topic: Form Design Improvement Request
Replies: 7
Views: 149

Re: Form Design Improvement Request

I am confused: sizers and padding/margin/border are two different and not mutually exclusive features? All items in the sizers can have borders (i.e., a gap around them)*, the limitation is that its size cannot be different for each side (and the drawer cannot be drawn). The spacers have their use a...
by PB
Wed Nov 07, 2018 1:05 pm
Forum: C++ Development
Topic: wxWidgets Destructor Abort [SOLVED]
Replies: 6
Views: 139

Re: wxWidgets Destructor Abort [SOLVED]

I believe using delete for wxWindows is not recommended: if you do not want to use Close() you should use Destroy() instead, see
https://docs.wxwidgets.org/3.1/classwx_window.html#a0c2a46181a89c349327f0b276f5ef8d7
by PB
Mon Nov 05, 2018 6:52 pm
Forum: Compiler / Linking / IDE Related
Topic: Problems with my windows build [SOLVED]
Replies: 4
Views: 325

Re: Problems with my windows build [SOLVED]

Assuming you added the library... I do not know whether it is the reason but with GCC, the order the libraries are listed matters. Is yours correct? E.g. the library order (but for release build of v3.1) taken from a command line goes like lwxmsw31u_core -lwxbase31u -lwxpng -lwxzlib -lwxjpeg -lwxtif...
by PB
Sun Nov 04, 2018 7:40 pm
Forum: C++ Development
Topic: wxSpinCtrl problem wxSpinEvent is handled twice
Replies: 18
Views: 352

Re: wxSpinCtrl problem wxSpinEvent is handled twice

gtafan wrote:Since in my final application I´ll not use wxMesageBox anymore everithing should worck fine


Yes. It has been also explained in this thread why using wxMessageBox() in such event handlers may be problematic and how to work around it (e.g. with CallAfter()).
by PB
Sat Nov 03, 2018 3:09 pm
Forum: Platform Related Issues
Topic: macOS Mojave and Dark Appearance
Replies: 6
Views: 214

Re: macOS Mojave and Dark Appearance

Yes, see the commit history.
by PB
Fri Nov 02, 2018 2:53 pm
Forum: C++ Development
Topic: wxSpinCtrl problem wxSpinEvent is handled twice
Replies: 18
Views: 352

Re: wxSpinCtrl problem wxSpinEvent is handled twice

Please don`t get it wrong, but your example uses 2 handler functions, which I defenetly don`t want to have. I am quite sure that the code I suggested you try, from Oct 26, does use just a single function handling wxEVT_SPINCTRL? I just need to know when the Value of SpinCtrl was updated.Is there po...
by PB
Thu Nov 01, 2018 7:45 pm
Forum: Platform Related Issues
Topic: A question about Window icon vs application icon [SOLVED]
Replies: 3
Views: 397

Re: A question about Window icon vs application icon [SOLVED]

I also suggest not calling SetIcon() and using SetIcons() instead, provided you actually have your icon in multiple resolutions. See the SetIcons() docs and e.g. this post for reasons why.
by PB
Thu Nov 01, 2018 4:43 pm
Forum: C++ Development
Topic: wxSpinCtrl problem wxSpinEvent is handled twice
Replies: 18
Views: 352

Re: wxSpinCtrl problem wxSpinEvent is handled twice

wxEVT_SPINCTRL is old (and seems now even undocumented) alias for wxEVT_SPINCTRL. The Connect() call seems, AFAICT, allright. Did you try to run the exact code from my Oct 26 post to see if the behaviour on your configuration is the same? It the minimal example behaves correctly, the issue must be s...
by PB
Thu Nov 01, 2018 2:12 pm
Forum: C++ Development
Topic: Internationalisation [SOLVED]
Replies: 22
Views: 434

Re: Internationalisation [SOLVED]

You probably also need to keep in mind that the wxWidgets catalog itself (wxstd) needs to be loaded. This is AFAIK done automatically by calling wxTranslations::AddStdCatalog() which in turn basically just calls AddCatalog(wxS("wxstd")). Additionally, if there are not folders with language...
by PB
Tue Oct 30, 2018 2:16 pm
Forum: C++ Development
Topic: Hiding a radio button
Replies: 2
Views: 74

Re: Hiding a radio button

I cannot reproduce the issue on MSW using recentish master with this code #include <wx/wx.h> class MyDialog : public wxDialog { public: MyDialog () : wxDialog(NULL, wxID_ANY, "Test") { m_radioButton = new wxRadioButton(this, wxID_ANY, "RadioButton"); wxButton* showHideButton = ne...

Go to advanced search