Search found 132 matches

by Kvaz1r
Fri Jun 07, 2019 11:51 am
Forum: C++ Development
Topic: wxSocketBase: Exiting after reading data
Replies: 19
Views: 402

Re: wxSocketBase: Exiting after reading data

In that case the only thing I can propose - provide SSCCE for reproducing behaviour.
by Kvaz1r
Fri Jun 07, 2019 11:16 am
Forum: C++ Development
Topic: wxSocketBase: Exiting after reading data
Replies: 19
Views: 402

Re: wxSocketBase: Exiting after reading data

Are you sure that your condition in while loop is correct? What if rewrite it in this way: while(IsConnected() && !Error()) { Read(&c, 1); if(LastReadCount() == 0) { break; } ... } Looking at it, it does the same thing only different positioning. Yours check immediately after reading, mine checks b...
by Kvaz1r
Fri Jun 07, 2019 10:04 am
Forum: C++ Development
Topic: wxSocketBase: Exiting after reading data
Replies: 19
Views: 402

Re: wxSocketBase: Exiting after reading data

Are you sure that your condition in while loop is correct?
What if rewrite it in this way:

Code: Select all

while(IsConnected() && !Error())
{
Read(&c, 1);
if(LastReadCount() == 0)
{
    break;
}
...
}
 
by Kvaz1r
Thu Jun 06, 2019 9:52 pm
Forum: Compiler / Linking / IDE Related
Topic: installing wxWidgets in Visual Studio
Replies: 20
Views: 663

Re: installing wxWidgets in Visual Studio

OK, I give up. Nothing I've tried worked. Would love to use wxWidgets; it looks like an excellent setup. Maybe I'll give it a week, forget everything I've done, and try again. In the Internet should be enough tutorials with description how to include additional libraries to VS project but if straig...
by Kvaz1r
Wed Jun 05, 2019 2:59 pm
Forum: Compiler / Linking / IDE Related
Topic: installing wxWidgets in Visual Studio
Replies: 20
Views: 663

Re: installing wxWidgets in Visual Studio

It would be better if you can say does minimal sample works for you? If it works you can just create VS-template base on it or create a new one by copying settings. If not - something went wrong and you should fix that issue first.
by Kvaz1r
Tue Jun 04, 2019 6:49 am
Forum: The Code Dump
Topic: wxSimpleJSON - JSON Library
Replies: 8
Views: 510

Re: wxSimpleJSON - JSON Library

There is amalgamate project for creating single header file you also can use it.
by Kvaz1r
Tue May 28, 2019 8:57 pm
Forum: C++ Development
Topic: I just can't understand sizers - trying to make panel fill horizontal space
Replies: 5
Views: 173

Re: I just can't understand sizers - trying to make panel fill horizontal space

In such cases usually much easier use some RAD tool like wxFormBuilder.

As for here replace

Code: Select all

vSizer->Add(hSizer, 1);
with

Code: Select all

vSizer->Add(hSizer, 1,wxEXPAND);
by Kvaz1r
Thu May 23, 2019 7:14 am
Forum: C++ Development
Topic: Event react change variable
Replies: 2
Views: 123

Re: Event react change variable

There is also observable pattern, so you also can use some useful libraries like this one: observable Btw, I don't think it's a good idea create many topics for one question( How to acces property of object in function outside of the Frame? and I need modify a property in other window ). If you didn...
by Kvaz1r
Tue May 21, 2019 1:49 pm
Forum: C++ Development
Topic: Read the comments of each group from an INI file
Replies: 2
Views: 130

Re: Read the comments of each group from an INI file

You can't since comments are skipping when file parse. So just use another parser or do it manually.

If you think it's a common problem you can open ticket - trac.wxwidgets.org
by Kvaz1r
Sun May 19, 2019 8:31 pm
Forum: C++ Development
Topic: I need modify a property in other window
Replies: 9
Views: 282

Re: I need modify a property in other window

I'm creating an simple audio editor. There is a scrolledWindow in mainFrame. When the audio is in, for example, 20 seconds, it's necessary load other part of wxScrolledWindow. It's still unclear for me. Do you need update ScrollWindow when the data were updated (from somewhere, the data don't depen...
by Kvaz1r
Sun May 19, 2019 2:34 pm
Forum: C++ Development
Topic: I need modify a property in other window
Replies: 9
Views: 282

Re: I need modify a property in other window

Can you describe what are you trying to achieve?
It's seems to me as The XY Problem.
by Kvaz1r
Thu May 16, 2019 1:37 pm
Forum: wxWidgets Development (Russian)
Topic: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10
Replies: 8
Views: 1252

Re: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10

Не до конца понимаю, почему пришлось убирать директиву #pragma... , не иначе как двойное перекодирование? Но в таком варианте работает. Спасибо! Скорее всего. Ни разу эту директиву раньше не встречал, но документация говорит, что она уже устаревшая: This compiler directive is obsolete starting in V...
by Kvaz1r
Thu May 16, 2019 10:12 am
Forum: wxWidgets Development (Russian)
Topic: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10
Replies: 8
Views: 1252

Re: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10

Так и Windows позволяет, я в VS без всяких макросов использую кириллицу. Что еще может быть...посмотрите установлен ли _UNICODE в определениях препроцессора(Проект -> Свойства->Свойства конфигурации -> C/C++ -> Препроцессор). Если стоит попробовать принудительно сохранить в utf8 с помощью другого ре...
by Kvaz1r
Thu May 16, 2019 7:12 am
Forum: C++ Development
Topic: Thread deletion - where?
Replies: 5
Views: 221

Re: Thread deletion - where?

Work with thread must be included into blocking section. So this code apparently don't do what it should do: if( m_db ) std::lock_guard<std::mutex>( m_db->GetTableVector().my_mutex ); Look for example in the documentation , each call has own locker. void MyFrame::OnClose(wxCloseEvent&) { { wxCritica...
by Kvaz1r
Tue May 14, 2019 2:43 pm
Forum: wxWidgets Development (Russian)
Topic: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10
Replies: 8
Views: 1252

Re: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10

Здравствуйте.
Возможно проблема в кодировке исходных файлов, хотя нужно проверить чтобы wxWidgets была собрана с поддержкой UNICODE.