Search found 211 matches

by Kvaz1r
Thu May 16, 2019 1:37 pm
Forum: wxWidgets Development (Russian)
Topic: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10
Replies: 8
Views: 1999

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

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

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

Re: m_locale.Init(wxLANGUAGE_RUSSIAN) Windows-10

Здравствуйте.
Возможно проблема в кодировке исходных файлов, хотя нужно проверить чтобы wxWidgets была собрана с поддержкой UNICODE.
by Kvaz1r
Mon May 13, 2019 2:53 pm
Forum: Platform Related Issues
Topic: wxADJUST_MINSIZE in wx 3.1.3 (GIT master) error under Windows
Replies: 1
Views: 273

Re: wxADJUST_MINSIZE in wx 3.1.3 (GIT master) error under Windows

I don't know why it build under macOS, but the macros is obsolete. From source code : wxADJUST_MINSIZE doesn't do anything any more but we still define it for compatibility. Notice that it may be also predefined (as 0, hopefully) in the user code in order to use it even in !WXWIN_COMPATIBILITY_2_8 b...
by Kvaz1r
Mon May 13, 2019 2:39 pm
Forum: C++ Development
Topic: WXchoice GetSelectios() string
Replies: 2
Views: 163

Re: WXchoice GetSelectios() string

by Kvaz1r
Wed May 08, 2019 6:00 pm
Forum: C++ Development
Topic: Access violation exception when use own wxDataViewVirtualListModel.
Replies: 2
Views: 193

Re: Access violation exception when use own wxDataViewVirtualListModel.

That's to be expected. If you say the list has 50 items, GetValueByRow() will be called with row values from 0 to 49. And if your vector is too small, you get an exception. The sample is a little confusing, in a real world application you wouldn't have a certain number of "real" items and then the ...
by Kvaz1r
Wed May 08, 2019 3:47 pm
Forum: C++ Development
Topic: Access violation exception when use own wxDataViewVirtualListModel.
Replies: 2
Views: 193

Access violation exception when use own wxDataViewVirtualListModel.

If size of vector not less than NUMBER_OF_ITEMS all works as expected, if I change it to something less - getting access violation. I've created model by analogy to model from dataview sample . MCVE: #include <wx/wx.h> #include <wx/dialog.h> #include <wx/dataview.h> #include <utility> typedef std::p...
by Kvaz1r
Mon May 06, 2019 2:11 pm
Forum: C++ Development
Topic: Setting the cell value with wxGridChoiceCellEditor
Replies: 3
Views: 250

Re: Setting the cell value with wxGridChoiceCellEditor

Hi. You should capture this :

Code: Select all

 CallAfter( [this](){ m_grid->SetCellValue( 1, m_column, "" )});
If it won't help I think better provide minimal example for testing.
by Kvaz1r
Mon May 06, 2019 7:38 am
Forum: C++ Development
Topic: Drag and drop images
Replies: 4
Views: 399

Re: Drag and drop images

Yes, here the overview in the documentation Drag and Drop Overview and a tutorial Drag and Drop in wxWidgets
by Kvaz1r
Mon May 06, 2019 6:43 am
Forum: C++ Development
Topic: Setting the cell value with wxGridChoiceCellEditor
Replies: 3
Views: 250

Re: Setting the cell value with wxGridChoiceCellEditor

ONEEYEMAN wrote:
Mon May 06, 2019 4:38 am
I tried to use CallAfter, like this:
What if passed to CallAfter lambda expression and make corresponding call there?
by Kvaz1r
Wed May 01, 2019 9:30 am
Forum: C++ Development
Topic: Display unicode on button?
Replies: 11
Views: 605

Re: Display unicode on button?

I see. Suppose the file I was loading was saved using ANSI Windows 1252: Can I specify the second argument in: wxString::wxString(const char*, const wxMBConv&) to handle that CP-1252 encoding to build wxString? It seems wxMBConv accepts only unicode (UTF-8, UTF-16, UTF-32) parameters. Yes. But ther...
by Kvaz1r
Wed May 01, 2019 8:38 am
Forum: C++ Development
Topic: Display unicode on button?
Replies: 11
Views: 605

Re: Display unicode on button?

purplex88 wrote:
Wed May 01, 2019 8:27 am
Any idea if I need to change locale? How will that be useful?
I don't know I'd never used this way. Maybe it will work if your default locale non-cyrillic, but to be honest i don't know much about locales. I also use VisualStudio and all work out of the box.
by Kvaz1r
Wed May 01, 2019 8:15 am
Forum: C++ Development
Topic: Display unicode on button?
Replies: 11
Views: 605

Re: Display unicode on button?

I am getting this result when I try to use unicode: If you have Unicode build of wxWidgets it shouldn't be a problem at all. But maybe the reason in "wrong" encoding your source file. Edit: which IDE do you use? If CodeBlocks + wxSmith here separate topic - Code::Blocks + wxSmith и русские буквы
by Kvaz1r
Tue Apr 30, 2019 9:14 pm
Forum: C++ Development
Topic: closing wxProgressDialog with a wxThread
Replies: 51
Views: 2233

Re: closing wxProgressDialog with a wxThread

thank you! std::future is new to me, have to look into that more. Yeah std::future is pretty simple comparing to wxThread :D. But keep in mind that STL containers haven't thread safe write operations so code from link above is wrong in part of collecting data. I have data files typically 450kB big ...