Search found 298 matches

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: 197

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: 1224

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: 1620

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: 300

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: 254

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: 491

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: 302

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: 198

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?
by Kvaz1r
Sat Feb 13, 2021 2:29 pm
Forum: C++ Development
Topic: Does wxURI encode non-ascii characters in a URI query part ?
Replies: 2
Views: 154

Re: Does wxURI encode non-ascii characters in a URI query part ?

It's more seems like problem with encoding, try create string as wide string:

Code: Select all

wxString plain(L"https://host.domain.tld/search?query=a a à");
by Kvaz1r
Tue Jan 26, 2021 9:24 pm
Forum: C++ Development
Topic: wxPoint or wxRealPoint as function parameter
Replies: 2
Views: 157

Re: wxPoint or wxRealPoint as function parameter

That is how ternary operator works in C++ - it attempt convert both operands to one type, and in case wxPoint and wxRealPoint there is such conversion. Don't use ternary operator in such situation ;-)
by Kvaz1r
Fri Jan 22, 2021 8:58 pm
Forum: Platform Related Issues
Topic: How to run the command and display it in the console?
Replies: 4
Views: 552

Re: How to run the command and display it in the console?

You can use wxExecute for running other process.
Also try:

Code: Select all

system("cd /d C:\someFolder");
by Kvaz1r
Sun Jan 17, 2021 12:18 pm
Forum: C++ Development
Topic: Heron alghoritm on class
Replies: 12
Views: 374

Re: Heron alghoritm on class

Why do you even want to write everything in OOP-style? "If you have a hammer, this does not mean that everything around is a nail."
by Kvaz1r
Sat Jan 16, 2021 9:52 am
Forum: C++ Development
Topic: how to solve an unknown problem
Replies: 13
Views: 587

Re: how to solve an unknown problem

Your question was how to use wxStyledTextCtrl on different pages of wxAuiNotebook, I was not going to write full editor ;-)
by Kvaz1r
Fri Jan 15, 2021 10:42 pm
Forum: C++ Development
Topic: how to solve an unknown problem
Replies: 13
Views: 587

Re: how to solve an unknown problem

you can help me how I can create several page and that the page must contain wxStyledTextCtrl Just add different wxStyledTextCtrl to each page of wxAuiNotebook. Here quick and dirty example(I use sizer for each Panel because wxFormBuilder force using them and as illustration that you can put more t...
by Kvaz1r
Thu Jan 07, 2021 4:52 pm
Forum: C++ Development
Topic: main() start two main() threads, one for a C++ backend and a seconf for the wxWidgets GUI
Replies: 4
Views: 225

Re: main() start two main() threads, one for a C++ backend and a seconf for the wxWidgets GUI

Can you describe what do you want in terms of tasks not of tools? wxWidgets itself is a C++ library, don't need to separate it from C++.