Search found 1248 matches

by T-Rex
Sun Dec 31, 2023 9:00 pm
Forum: C++ Development
Topic: Creating wxImage/wxBitmap from string of hex bytes?
Replies: 5
Views: 11333

Re: Creating wxImage/wxBitmap from string of hex bytes?

What do you store in <data>? Only RGB or RGBA or complete bitmap file with the bitmap header? The correct solution will depend on your answer.
by T-Rex
Tue Sep 19, 2023 7:44 pm
Forum: wxWidgets Development (Russian)
Topic: wxWidgets + linux + многопоточность(std) = ошибка сегментирования
Replies: 5
Views: 12224

Re: wxWidgets + linux + многопоточность(std) = ошибка сегментирования

Такие идеи есть: если идет обращение к контролам в конструкторе, то в Linux может не работать. Там контролы фактически создаются позже и надо ловить wxWindowCreateEvent и вот там уже можно обращаться к UI. Попробуй перенести из конструктора для начала в обработчик какой-то кнопки. Если по кнопке буд...
by T-Rex
Mon Dec 26, 2022 10:14 am
Forum: C++ Development
Topic: How to add image to my wxwidgets panel
Replies: 5
Views: 4962

Re: How to add image to my wxwidgets panel

If you want to put an image onto wxPanel as a part of layout and don't want to edit/modify/draw on it, then you need to create a wxBoxSizer and then put wxStaticBitmap and pther controls into the sizer. Then connect the wxBoxSizer to wxPanel using SetSizer() method.
by T-Rex
Mon Nov 21, 2022 10:40 pm
Forum: wxWidgets Development (Russian)
Topic: Locale independent wxDateTime::ParseFormat()
Replies: 2
Views: 8927

Re: Locale independent wxDateTime::ParseFormat()

Есть еще такое (ну и схожие решения) для определения языка оффлайн, но, судя по размерам баз, оно того не стоит, там десятки мегабайт словарей. Для такой задачи оверхед, мне кажется.
by T-Rex
Mon Nov 21, 2022 10:33 pm
Forum: wxWidgets Development (Russian)
Topic: Locale independent wxDateTime::ParseFormat()
Replies: 2
Views: 8927

Re: Locale independent wxDateTime::ParseFormat()

Красивого решения локального без прямого перебора пока не придумал, но если цель сделать любым путем, не смотря ни на что, то можно отдать текст на детекцию локали в Google Translate
by T-Rex
Mon Oct 31, 2022 4:33 pm
Forum: wxWidgets Development (Russian)
Topic: Linux печать только 2-й страницы
Replies: 16
Views: 30907

Re: Linux печать только 2-й страницы

В целом, если и в системе такая же проблема, то выглядит как проблема или специфичное поведение драйвера. А есть возможность качнуть официальные драйвера от производителя на указанный принтер? Или погонять какую-то более новую модель с официальными драйверами? Это не кажется проблемой wxWidgets так ...
by T-Rex
Sat Oct 29, 2022 6:27 pm
Forum: wxWidgets Development (Russian)
Topic: Linux печать только 2-й страницы
Replies: 16
Views: 30907

Re: Linux печать только 2-й страницы

А если перечислять все страницы через запятую? 1,3,5,6
by T-Rex
Fri Oct 28, 2022 5:55 am
Forum: wxWidgets Development (Russian)
Topic: Linux печать только 2-й страницы
Replies: 16
Views: 30907

Re: Linux печать только 2-й страницы

Использовать напрямую линуксовое АПИ для печати, наверное. Оборачивать это в wxWidgets-based обертку и использовать с директивами препроцессора, чтобы на других платформах была другая логика. Ну или пойти реализовать самому все что нужно, внутри wxWidgets, отправить патч разработчикам, чтобы включил...
by T-Rex
Thu Sep 01, 2022 8:44 am
Forum: wxWidgets Development (Russian)
Topic: Linux и рисование на wxClientDC и wxPaintDC
Replies: 2
Views: 7128

Re: Linux и рисование на wxClientDC и wxPaintDC

Код пока не смотрел, но мне кажется что ты неправильно Client DC используешь. Отрисовка на Client DC не персистентная и будет видна только до ближайшего рефреша. По нажатию на кнопку надо бы менять модель и уже в EVT_PAINT хэндлере эту модель отрисовывать. Код гляну чуть позже, может еще будут комме...
by T-Rex
Sat Aug 27, 2022 3:23 pm
Forum: C++ Development
Topic: Adding a listener on top of a default listener
Replies: 2
Views: 9549

Re: Adding a listener on top of a default listener

If you already have an event handler method for your control and need another one, you probably need to add another event handler object with the same event handling rule (same event type and same control ID). You can add another event handler using wxWindow::PushEventHandler() . Don't forget to pop...
by T-Rex
Sun Aug 14, 2022 12:39 pm
Forum: C++ Development
Topic: Interprocess communication
Replies: 1
Views: 3759

Re: Interprocess communication

You can specify the port number as a second parameter (serviceName) according to the documentation.
And yes, this will be a TCP connection.
by T-Rex
Sat Jul 23, 2022 9:41 am
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find wxWidgets after install from source
Replies: 8
Views: 20254

Re: cmake can't find wxWidgets after install from source

If you are able to build and run the sample projects then you need to see what arguments of wx-config are used there and compare with what CMake uses (there should be the log file where all the commands are mentioned). And as PB mentioned try to use the older version of wxWidgets or the latest CMake...
by T-Rex
Fri Jul 22, 2022 8:57 pm
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find wxWidgets after install from source
Replies: 8
Views: 20254

Re: cmake can't find wxWidgets after install from source

Ensure that you have cloned wxWidgets with submodules. Ensure that you have the dev packages for libjpeg and libtiff installed on your machine. Ensure that you configured and built wxWidgets with support of jpeg and tiff libs. If you haven't then uninstall, reconfigure, rebuild and reinstall wxWidge...
by T-Rex
Sun Jun 26, 2022 4:47 pm
Forum: C++ Development
Topic: Waiting for a window to close
Replies: 3
Views: 5723

Re: Waiting for a window to close

Try to google or search at the forum. There are examples. The idea is that you spawn the process using wxExecute and then either create a timer or separate thread that monitors the state of the process. See the code snippets from the link above. In case if you don't manage to solve this - return bac...
by T-Rex
Sun Jun 26, 2022 10:09 am
Forum: C++ Development
Topic: Waiting for a window to close
Replies: 3
Views: 5723

Re: Waiting for a window to close

If you spawn the new process that installs the drivers, then you may just wait the process to finish. If you run the process asynchronously, you can use the timer or background thread that checks whether the process exists by its PID. If you check whether the specific window exists then it's probabl...