Search found 305 matches

by Kvaz1r
Fri Jun 25, 2021 7:19 pm
Forum: C++ Development
Topic: Template Help
Replies: 2
Views: 955

Re: Template Help

What does compiler say and do you try to find answer by yourself?
by Kvaz1r
Wed Jun 23, 2021 10:06 am
Forum: C++ Development
Topic: C++ String Converting with wx
Replies: 7
Views: 1157

Re: C++ String Converting with wx

Just combine code from previous messages:

Code: Select all

widget->SetLabel(wxString::Format("%i", i));
where widget is your wxStaticText.
by Kvaz1r
Wed Jun 23, 2021 7:21 am
Forum: C++ Development
Topic: C++ String Converting with wx
Replies: 7
Views: 1157

Re: C++ String Converting with wx

Code: Select all

m_button->SetLabel(labelText);
Btw, there is widgets sample that allow to see what one can do with different widgets.
by Kvaz1r
Sun Jun 20, 2021 6:43 am
Forum: Open Discussion
Topic: Windows Forms VS. wxWidgets which one is better?
Replies: 1
Views: 1354

Re: Windows Forms VS. wxWidgets which one is better?

Not best place to ask such question, but:
1. WinForms is part of C++/CLI(CLR) so it's not C++.
2. It's not longer support by Microsoft.
3. Even for C# Win Forms very primitive.
by Kvaz1r
Wed Jun 02, 2021 6:06 pm
Forum: C++ Development
Topic: Writing a loop on menu bar
Replies: 4
Views: 968

Re: Writing a loop on menu bar

Just use static_cast and there won't be warnings.
by Kvaz1r
Fri May 14, 2021 5:34 pm
Forum: The Code Dump
Topic: Simple wxSwitchCtrl class
Replies: 11
Views: 3226

Re: Simple wxSwitchCtrl class

Do you have a public repo with the project on any public host(Github/Gitlab/SourceHut/...)? It will be easy to track changes or propose them via PR.
by Kvaz1r
Fri May 14, 2021 6:31 am
Forum: C++ Development
Topic: wxThread and wxQueueEvent
Replies: 11
Views: 1523

Re: wxThread and wxQueueEvent

Thank you both New Pagodi and doublemax! The issue was resolved with your suggestions :) Is there a way to request the corrections of the webpage https://docs.wxwidgets.org/trunk/classwx_thread.html I am hoping no one will suffer the same problem as I did. Thanks You can fix it and propose patch - ...
by Kvaz1r
Tue Apr 13, 2021 1:50 pm
Forum: Compiler / Linking / IDE Related
Topic: The easy and rapid method to start wxWidgets project in visual studio 2019
Replies: 10
Views: 3869

Re: The easy and rapid method to start wxWidgets project in visual studio 2019

I am using visual studio 2019 to create GUI projects, the thing is each time I want to create a project to test something, I have to go through all the steps to include setup.h file lib includes and other stuff to get the project compiled. Sometimes it takes more time especially when you forgot som...
by Kvaz1r
Thu Mar 18, 2021 12:02 pm
Forum: Open Discussion
Topic: sizer in MFC is quite clever
Replies: 11
Views: 4257

Re: sizer in MFC is quite clever

I'm familiar with such layout system, but for me it's not so convenient as automatic sizers in wxWidgets and at least wxBoxSizer is as simple as it could be.
by Kvaz1r
Thu Mar 11, 2021 2:23 pm
Forum: wxWidgets Development (Russian)
Topic: Как определить область Desktop-а с учетом Taskbar-а ?
Replies: 21
Views: 5787

Re: Как определить область Desktop-а с учетом Taskbar-а ?

Мне эта затея кажется странной, но попробуйте добавить

Code: Select all

temp.Layout();
и посмотреть изменится ли что-нибудь.
by Kvaz1r
Thu Mar 04, 2021 10:43 am
Forum: C++ Development
Topic: Advice on using the new keyword.
Replies: 4
Views: 509

Re: Advice on using the new keyword.

Just show your friend documentation - Window Deletion.
And about error handling , if for some reason OS won't allocate memory for your app just let it crash, because usually there isn't that you can do to fix it.
by Kvaz1r
Tue Mar 02, 2021 10:54 pm
Forum: C++ Development
Topic: wxWizard determine which of Back or Finish has been pressed
Replies: 9
Views: 581

Re: wxWizard determine which of Back or Finish has been pressed

While I'm agree that it would be better to look at the problem under different angle, you can get button from wxWizard with something like that: auto nextButton = wxDynamicCast(this->FindWindowById(wxID_FORWARD), wxButton); if (nextButton) { nextButton->Bind(wxEVT_BUTTON, [this](wxCommandEvent& ev) ...
by Kvaz1r
Tue Mar 02, 2021 1:43 pm
Forum: C++ Development
Topic: wxDecodeChar returns invalid string iterator and crashes program
Replies: 11
Views: 875

Re: wxDecodeChar returns invalid string iterator and crashes program

In that case real problem could be somewhere else. Can you provide minimal sample for reproducing the behaviour?
by Kvaz1r
Fri Feb 26, 2021 7:54 am
Forum: General Development
Topic: What is the best locking mechanism
Replies: 1
Views: 2230

Re: What is the best locking mechanism

Mutex is blocking operation so if one thread is use protected resource all other thread who try to get access to mutex will block until resource won't be unlocked. If anything goes wrong - deadlock.

If you want handle such cases - use try_lock or try_lock_until/try_lock_for from std::timed_mutex.
by Kvaz1r
Wed Feb 24, 2021 1:38 pm
Forum: C++ Development
Topic: wxAuiNotebook - no page change event after close
Replies: 4
Views: 372

Re: wxAuiNotebook - no page change event after close

It's indeed strange, because the DeletePage function is indeed generate page change event. Could you provide minimal sample for reproducing the behaviour?