Search found 2070 matches

by PB
Fri Nov 15, 2019 8:52 pm
Forum: C++ Development
Topic: how to detect input up and down on wxControl?
Replies: 11
Views: 128

Re: how to detect input up and down on wxControl?

Here is a complete compilable example of the most simplest implementation of a button-like control, implemented in more modern way than the one doublemax referenced above. It still does not use lambdas as I do not see their usefulness for this type of code here. The control changes its appearance an...
by PB
Fri Nov 15, 2019 8:19 pm
Forum: C++ Development
Topic: how to detect input up and down on wxControl?
Replies: 11
Views: 128

Re: how to detect input up and down on wxControl?

You can use Bind() instead of event tables.

Bind() can use lambdas.

But you should probably start with learning wxWidgets basics. Check the official documentation and samples.
by PB
Fri Nov 15, 2019 7:27 pm
Forum: Compiler / Linking / IDE Related
Topic: Can dlls be included for use with makefiles
Replies: 3
Views: 62

Re: Can dlls be included for use with makefiles

You know you can build wxWidgets in static configuration (not using SHARED at all, or SHARED=0) and then no wxWidgets DLL will be needed?

You can even build wxWidgets and your app both with MSVC and GCC so that no compiler runtime libraries are needed, so that your program does not require any DLLs.
by PB
Fri Nov 15, 2019 5:53 pm
Forum: General Development
Topic: c++ intellectual property protection
Replies: 6
Views: 88

Re: c++ intellectual property protection

I thought that the MAC address as well as the volume ID (unlike HDD ID) can be (easily) changed? AFAIK CPUID is not a unique CPU ID, it is just features the CPU has, so it is the same for all CPUs with the same model? BTW, on Windows, there is WMI interface for obtaining many low-level HW informatio...
by PB
Tue Nov 12, 2019 9:24 pm
Forum: C++ Development
Topic: How to handle KILL_FOCUS globally
Replies: 3
Views: 53

Re: How to handle KILL_FOCUS globally

benezan wrote:
Tue Nov 12, 2019 9:00 pm
Is there a safe way to always notice when the focus goes away from my window?
Have you tried wxActivateEvent: https://docs.wxwidgets.org/trunk/classw ... event.html
by PB
Sun Nov 03, 2019 9:22 am
Forum: General Development
Topic: Has anyone successfully built an CEF application with wxGTK?
Replies: 3
Views: 174

Re: Has anyone successfully built an CEF application with wxGTK?

Do you know about wxWebViewChromium? For some reason, it has been long unmerged but perhaps it can serve as an inspiration:
https://github.com/wxWidgets/wxWidgets/pull/706

However, IIRC wxWebViewChromium structure (implementation of CEF classes) is kinda different from the CEF examples.
by PB
Wed Oct 30, 2019 8:22 pm
Forum: C++ Development
Topic: text ctrl with a clear button?
Replies: 1
Views: 117

Re: text ctrl with a clear button?

I don't think so. If you are really want it, perhaps it should not be hard to write, heavily borrowing from the generic version of wxSearchCtrl.
by PB
Wed Oct 30, 2019 6:59 pm
Forum: Compiler / Linking / IDE Related
Topic: error compiling wxwidgets 3.1.3 with mingw and msys
Replies: 27
Views: 555

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Did you check wxWidgets really built successfully, i.e., there were no errors in the build log and all expected library files were produced? I do not use MSYS/configure (I find gcc makefiles much easier to use) but your command line looks suspicious to me, e.g. parts like this --host=i586-mingw32msv...
by PB
Wed Oct 30, 2019 12:30 pm
Forum: Compiler / Linking / IDE Related
Topic: Download MinGW-TDM 5.10 Windows Binaries
Replies: 4
Views: 102

Re: Download MinGW-TDM 5.10 Windows Binaries

The https protocol points to the new version 3.1.3, where the binaries do not exist yet. Based on developer conversations, I think it is very likely that TDM-GCC support has been dropped for good (the recent changes in expat present in 3.1.3 fail to build with TDM-GCC in 32-bit). The compiler is de...
by PB
Tue Oct 29, 2019 5:30 pm
Forum: Compiler / Linking / IDE Related
Topic: "wchar_t must be available" error even without unicode support
Replies: 8
Views: 168

Re: "wchar_t must be available" error even without unicode support

I can confirm that there is an issue when building wxWidgets with CMake and wxUSE_UNICODE unchecked. However, it seems this issue is with CMake build system support in wxWidgets, not wxWidgets sources themselves. wxWidgets 3.1.3 still builds fine with nmake passed UNICODE=0 (MSVS 2019, 32-bit debug ...
by PB
Mon Oct 28, 2019 9:25 am
Forum: C++ Development
Topic: [Solved]wxWidgets multithreaded and update UI.
Replies: 8
Views: 242

Re: [Solved]wxWidgets multithreaded and update UI.

TBH, I do not understand why you did not learn from the example. The docs say that wxPostEvent() is not MT-safe. You should use wxThreadEvent and wxQueueEvent(). Connect() is de-facto deprecated and Bind() should be used instead. I also suggest creating the main frame in the OnInit() as the custom d...
by PB
Sun Oct 27, 2019 2:10 pm
Forum: C++ Development
Topic: [Solved]wxWidgets multithreaded and update UI.
Replies: 8
Views: 242

Re: std::thread will block gui and more strange beheavior.

Here is an example of a thread loading data in background. It does not use std::thread (as it is based on my code) but it should not matter, the principle should be the same. Try to compile and run as it is to see what it does. #include <wx/wx.h> #include <wx/arrstr.h> #include <wx/thread.h> // the ...
by PB
Sun Oct 27, 2019 10:16 am
Forum: C++ Development
Topic: [Solved]wxWidgets multithreaded and update UI.
Replies: 8
Views: 242

Re: std::thread will block gui and more strange beheavior.

I want to change a element through a thread, then I find some strange problems. For starters: Are you aware that you can use GUI classes only from the main thread (= the thread wxWidgets were initialized from, i.e., where wxThread::IsMain() returns true)? See e.g. here: https://docs.wxwidgets.org/t...
by PB
Mon Oct 14, 2019 7:39 pm
Forum: C++ Development
Topic: Is wxListCtrl crossplatform?
Replies: 16
Views: 364

Re: Is wxListCtrl crossplatform?

I do not think he is ignoring you. Vadim is just extremely busy. Additionally, adding a new feature for all platforms may not be easy. Can you test it on MSW, OSX, and Linux (and Qt)? I have added only a bit here and there for MSW only and even that was often surprisingly difficult, just making sure...
by PB
Sun Oct 13, 2019 1:05 pm
Forum: C++ Development
Topic: own Popup for wxcomboctrl (wxPanel)
Replies: 3
Views: 202

Re: own Popup for wxcomboctrl (wxPanel)

TBH, I think the code you posted is not good for other people to spot an error. It misses important parts and/or has a lot of irrelevant ones.

Is it really that difficult to prepare the most basic, preferably compilable, code manifesting the issue?