Search found 2117 matches

by PB
Tue Jan 21, 2020 8:13 pm
Forum: Compiler / Linking / IDE Related
Topic: Compilation problem: build.cfg file is missing
Replies: 2
Views: 63

Re: Compilation problem: build.cfg file is missing

As ONEEYEMAN already wrote, I am not sure you are supposed to mix MSVC and some "wx-config-win" utility which I believe is neither a part of wxWidgets nor is it intended for use with MSVC. I have just tested building a recentish master with MSVC 2019 and found that using: * CMake does NOT produce bu...
by PB
Thu Jan 16, 2020 10:23 am
Forum: C++ Development
Topic: Best control for the task
Replies: 5
Views: 100

Re: Best control for the task

I have never tried, but at least in theory should not this be possible also with wxGrid?
by PB
Wed Jan 15, 2020 8:48 pm
Forum: C++ Development
Topic: WarpPointer question
Replies: 8
Views: 182

Re: WarpPointer question

Moving the mouse cursor on screen seems to work just fine for me with the master on MSW doing this, moving the cursor directly in the mouse wheel event handler #include <wx/wx.h> class MyFrame : public wxFrame { public: MyFrame() : wxFrame(nullptr, wxID_ANY, "Mouse Wheel to Center Cursor") { Bind(wx...
by PB
Wed Jan 15, 2020 12:05 pm
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 154

Re: wxSpinCtrl Enter should do what Tab does

I do not know if subclassing the controls for that is the best idea. E.g, in wxFormBuilder support for custom controls, even those deriving from the supported ones with the same public interface is not the best. Seeing as wxSpinCtrl and wxSpinCtrl double do not have a common "spin" ancestor, I would...
by PB
Tue Jan 14, 2020 8:39 pm
Forum: C++ Development
Topic: wxSpinCtrl Enter should do what Tab does
Replies: 10
Views: 154

Re: wxSpinCtrl Enter should do what Tab does

That sounds perfect and was what I was looking for, unfortunately nothing happens. Seems to work fine for me with the master on MSW, did you create the spin control with wxTE_PROCESS_ENTER flag? #include <wx/wx.h> #include <wx/spinctrl.h> class MyFrame : public wxFrame { public: MyFrame () : wxFram...
by PB
Mon Jan 13, 2020 7:22 am
Forum: C++ Development
Topic: The thread does not want to finish because of the “TestDestroy” always return false.
Replies: 10
Views: 180

Re: The thread does not want to finish because of the “TestDestroy” always return false.

You can see an example how to update the UI from thread e.g. here https://forums.wxwidgets.org/viewtopic.php?f=1&t=46485#p194840 if you want just test how the thread works, do your diagnostics via printf(...), or std::cout<<"text". I would recommend using wxLog instead, e.g. wxLogDebug. This should ...
by PB
Mon Jan 06, 2020 11:34 am
Forum: C++ Development
Topic: Should I call wxLocal::Init() on every wxThread created?
Replies: 13
Views: 210

Re: Should I call wxLocal::Init() on every wxThread created?

in my configuration wxString is definitely not thread safe, and not because of explicit access to the string from different threads. if one thread just gives a string as reference to another and forgets about this string, app will crash. only cloned copy saves the situation. as it referenced in men...
by PB
Mon Jan 06, 2020 10:56 am
Forum: C++ Development
Topic: Should I call wxLocal::Init() on every wxThread created?
Replies: 13
Views: 210

Re: Should I call wxLocal::Init() on every wxThread created?

how can be implemented reference to the same buffer(kinda copy-on-demand) if there is no refcounter? Sorry, I do not understand the question. What I wrote in my previous post was that unless you are using a non-default wxWidgets build or an old compiler, the wxString is not reference-counted, i.e.,...
by PB
Mon Jan 06, 2020 10:08 am
Forum: C++ Development
Topic: Should I call wxLocal::Init() on every wxThread created?
Replies: 13
Views: 210

Re: Should I call wxLocal::Init() on every wxThread created?

giving wxString by value to a thread doesnot help you, because two wxString instances will refer to the same buffer with string data. every string you gave to a thread must be cloned by string.Clone(); The default wxString implementation uses std::(w)string which AFAIK does not use reference-counti...
by PB
Sun Jan 05, 2020 9:58 pm
Forum: C++ Development
Topic: wxNotebook pages color rendering issue
Replies: 6
Views: 134

Re: wxNotebook pages color rendering issue

I have just edited my previous post, in case you missed it: You need to call Refresh() before Update(). In the OP, you have the order wrong but perhaps the methods are not listed in the order you call them...
by PB
Sun Jan 05, 2020 9:36 pm
Forum: C++ Development
Topic: wxNotebook pages color rendering issue
Replies: 6
Views: 134

Re: wxNotebook pages color rendering issue

The code you posted, aside from being unnecessarily long: 1) Does not set a background color anywhere. 2) Misses some declarations, so it does not build out of the box. After adding the declarations, slightly modifying the code to build, and setting the background color (see the comments starting wi...
by PB
Sun Jan 05, 2020 5:44 pm
Forum: C++ Development
Topic: Larger then 69 wxTextCtrl font size?
Replies: 3
Views: 91

Re: Larger then 69 wxTextCtrl font size?

I can set wxTextCtrl font size to 100 (or 200) points easily on Windows 10, using this code #include <wx/wx.h> class MyApp : public wxApp { public: bool OnInit() override { wxFrame* frame = new wxFrame(nullptr, wxID_ANY, "Test"); wxTextCtrl* textCtrl = new wxTextCtrl(frame, wxID_ANY); wxFont font = ...
by PB
Sun Jan 05, 2020 4:41 pm
Forum: C++ Development
Topic: wxNotebook pages color rendering issue
Replies: 6
Views: 134

Re: wxNotebook pages color rendering issue

Works for me with recentish master on Windows 10: yellow wxNotebook page.png using this code #include <wx/wx.h> #include <wx/notebook.h> class MyDialog : public wxDialog { public: MyDialog () : wxDialog(nullptr, wxID_ANY, "Test", wxDefaultPosition, wxSize(800, 500), wxDEFAULT_DIALOG_STYLE | wxRESIZE...
by PB
Sat Jan 04, 2020 4:57 pm
Forum: Platform Related Issues
Topic: Where is registry.h?
Replies: 1
Views: 88

Re: Where is registry.h?

But it is there https://github.com/wxWidgets/wxWidgets/blob/v3.1.2/include/wx/msw/registry.h BTW, if usually works either way, but AFAIK one is supposed to include the header files not in the source tree with angle brackets (as shown in the docs you referred) instead of quotation marks. This simple ...