Search found 3062 matches

by PB
Sun Jul 25, 2021 1:28 pm
Forum: Platform Related Issues
Topic: Windows: destruction of wxTreeCtrl with many items is very slow
Replies: 3
Views: 168

Re: Windows: destruction of wxTreeCtrl with many items is very slow

I cannot reproduce it in the scenario where there are 10k items as children of the root, and each of those items has 10 items of its own, i.e. 100k items in total. Creating such wxTreeCtrl takes about 1200 ms, deleting about 450 ms (wxWidgets master, Windows 10 21H1): #include <wx/wx.h> #include <wx...
by PB
Thu Jul 22, 2021 9:37 pm
Forum: C++ Development
Topic: Bug in wxJoystickEvent?
Replies: 4
Views: 277

Re: Bug in wxJoystickEvent?

I have never used wxJoystickEvent nor am I familiar with handling game controller input. Be that as it may, to me it seems that the documentation is incorrect. Firstly, that returning one of the two wxJOYSTICK n values would mean that a system can have only at most two game controllers attached (I s...
by PB
Tue Jul 20, 2021 9:22 pm
Forum: C++ Development
Topic: wxMkDir return false even if it successfully creates the directory.
Replies: 7
Views: 685

Re: wxMkDir return false even if it successfully creates the directory.

You create clearDataDialog with wxYES_NO style but delete the files when its ShowModal() returns wxID_OK. I wonder how that can work.

I assume you are aware that the user probably will not see the message of wxLogDebug(), unless it works differently on Linux than on Windows (Debug vs Release builds).
by PB
Wed Jul 14, 2021 9:52 pm
Forum: C++ Development
Topic: How to add locale translations support in wx application?
Replies: 2
Views: 452

Re: How to add locale translations support in wx application?

Did you read the manual?
https://docs.wxwidgets.org/trunk/overview_i18n.html

Make sure to not confuse your macros, i.e., use only _() and when needed the last four ones from here: https://docs.wxwidgets.org/trunk/group_ ... tring.html
by PB
Mon Jul 12, 2021 9:58 am
Forum: C++ Development
Topic: Re: wxPaintDC
Replies: 2
Views: 493

Re: wxPaintDC

You just need to pass a wxPaintDC from the wxPaintEvent handler to a helper function as a reference or pointer instead by value? #include <wx/wx.h> #include <wx/dcbuffer.h> class MyCanvas : public wxPanel { public: MyCanvas(wxWindow* parent) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSi...
by PB
Sun Jul 11, 2021 6:14 pm
Forum: General Forum Issues
Topic: Error "The submitted form was invalid"
Replies: 19
Views: 9594

Re: Error "The submitted form was invalid"

Another issue I have been noticing these past few days: Even when I mark all the posts read using Mark forums read link on the main page, the next visit the threads are still shown as unread.

No idea if it is related when this has started happening just recently.
by PB
Sat Jul 10, 2021 5:37 pm
Forum: C++ Development
Topic: wxMemoryDC->SetTextForeground
Replies: 10
Views: 744

Re: wxMemoryDC->SetTextForeground

I could not use your code verbatim because I use wxMemoryDC * and not wxMemoryDC. Sorry, verbatim means "exactly as it is", so you could use it and I already explained why you should have. What's glaring is the difference in platform level behavior. I am not saying that there are no platform differ...
by PB
Sat Jul 10, 2021 4:20 pm
Forum: C++ Development
Topic: wxMemoryDC->SetTextForeground
Replies: 10
Views: 744

Re: wxMemoryDC->SetTextForeground

You did not answer any of my questions I believe relevant to the issue nor did you report if running my code verbatim reproduces the issue (if nothing else to make sure that it is not due to a difference in wxWidgets version): Why? Looking at your codes I understand you are new not only to wxWidgets...
by PB
Sat Jul 10, 2021 3:33 pm
Forum: C++ Development
Topic: wxMemoryDC->SetTextForeground
Replies: 10
Views: 744

Re: wxMemoryDC->SetTextForeground

The observed anomalous behaviour is on Windows 10. I draw to a wxMemoryDC and later blit that to a wxPaintDC. So exactly the same what I showed working in the second code block in my previous post? Can you reproduce the issue with using that code verbatim on your setup? If you cannot you must have ...
by PB
Sat Jul 10, 2021 3:01 pm
Forum: C++ Development
Topic: wxMemoryDC->SetTextForeground
Replies: 10
Views: 744

Re: wxMemoryDC->SetTextForeground

I cannot confirm this on Win10. I am using GIT master but I am not aware of any code change that could affect this. dc_settextforeground.png #include <wx/wx.h> class MyApp : public wxApp { public: bool OnInit() override { wxFrame* frame = new wxFrame(nullptr, wxID_ANY, "Test"); frame->SetBackgroundC...
by PB
Sat Jul 10, 2021 11:54 am
Forum: Compiler / Linking / IDE Related
Topic: How do I link wxwidgets using dlls?
Replies: 3
Views: 1046

Re: How do I link wxwidgets using dlls?

HansLjy wrote:
Sat Jul 10, 2021 9:52 am
Now I have a gcc_dll directory. What to do next?
Follow the instructions for the build system / IDE you are using. This should be a good start:
https://docs.wxwidgets.org/trunk/plat_m ... build_apps
by PB
Fri Jul 09, 2021 7:11 pm
Forum: Compiler / Linking / IDE Related
Topic: how to build lib or dll for wxmathplot using mingw64 in windows
Replies: 10
Views: 1037

Re: how to build lib or dll for wxmathplot using mingw64 in windows

I setup code::block enviroment such as search path for compiler and linker to wxWidgets include folder and lib/dll folders. I consider this a very bad practice, the library should be set in the project instead of compiler properties? How will you use both Debug and Release builds of wxWidgets? I bu...
by PB
Thu Jul 08, 2021 8:34 am
Forum: General Forum Issues
Topic: Error "The submitted form was invalid"
Replies: 19
Views: 9594

Re: Error "The submitted form was invalid"

As already wrote, clearing cookies fixes the log out issue but I still could not post after a new login.

Happened to me on July 6 again, but I found interesting that while I could not post it seemed a new post from another user appeared - but I just might have missed it.
by PB
Tue Jul 06, 2021 3:14 pm
Forum: C++ Development
Topic: File open not working on MacOs
Replies: 3
Views: 1301

Re: File open not working on MacOs

Regardless of the OS, using just a file name is generally a bad idea, as this depends on the current working directory and is rather brittle. If you do not have a path from the user, you can use wxStandardPaths to obtain a path to a known location: https://docs.wxwidgets.org/trunk/classwx_standard_p...