I'm thrilled to notice that wxWidgets is starting to upgrade to modern C++. How are you upgrading your wxWidgets app code base from pre C++-11 to modern C++? Share your experiences.
Bind(wxEVT_MENU, [=](wxCommandEvent&) { wxLogMessage("Hello from a lambda!"); }, ID_Hello);
wxWidgets has truly impressed me, and I'm glad it came to the rescue for those of us who use C++ as our primary language. Since learning C++, I’ve been excited to build GUI applications, and wxWidgets has become my tool of choice.
To test my mastery of the library, I built a working Minesweeper game that features an intuitive interface and smooth gameplay. You can clone and test the code here. The interface follows the design shown in the figure below. What do you think? Are there any suggestions for making the interface even more user-friendly?
I am an experienced C++ developer who has been exploring cross-platform frameworks for GUI development. I discovered wxWidgets and found it to be an indispensable tool for creating robust and versatile graphical interfaces. Leveraging my experience with wxWidgets, I designed and developed a sample POS GUI to demonstrate my skills. Below, you can find the design and the corresponding code.
PS: I am open to take a challenge on developing a GUI in wxWidgets - be free to send/tag me some designs.
I have updated WxWidgets in UV-Remap to version 3.3 and think the new support for dark mode looks great. I've been waiting a long time for this and the customers even more so.
Any tips for custom widgets? Specially custom MenuBar, Button and StaticBoxSizer. In wxPython, i used to use a class called wxGenButton to create custom buttons. I could do the same in C++ with a wxWindow/Control, the problem is, for some reason, this type of widget has a limit amount of times it can be clicked per second and it is fairly low. For the MenuBar, the docs say it inherits from wxWindow, but digging the source I found out it inherits from wxMenuBarBase. I could dig the source and see what I can find, but it would help a lot if someone knows a bit about the subject.
I've coded an application about 15 years ago with wxwidgets 2.8 It was running on xp for years and now we got a new pc with linux. Compilation went fine.
However, after several hours a wxsocket object turns dead. All reads time out.
I keep getting this error whenever I try to compile:
..\..\include/wx/msw/ole/oleutils.h: In function 'bool wxOleInitialize()':
..\..\include/wx/msw/ole/oleutils.h:49:16: error: 'RPC_E_CHANGED_MODE' was not declared in this scope
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
^~~~~~~~~~~~~~~~~~
..\..\include/wx/msw/ole/oleutils.h:49:47: error: 'FAILED' was not declared in this scope
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
^
..\..\include/wx/msw/ole/oleutils.h: At global scope:
..\..\include/wx/msw/ole/oleutils.h:146:42: error: 'S_OK' was not declared in this scope
wxVariantDataErrorCode(SCODE value = S_OK) { m_value = value; }
^~~~
../../src/common/filename.cpp: In member function 'bool wxFileName::GetShortcutTarget(const wxString&, wxString&, wxString*) const':
../../src/common/filename.cpp:1660:23: error: 'SUCCEEDED' was not declared in this scope
if (SUCCEEDED(hres))
^
../../src/common/filename.cpp: In member function 'wxString wxFileName::GetLongPath() const':
../../src/common/filename.cpp:2250:21: error: 'ERROR_FILE_NOT_FOUND' was not declared in this scope
if ( err == ERROR_FILE_NOT_FOUND || err == ERROR_BAD_NETPATH )
^~~~~~~~~~~~~~~~~~~~
../../src/common/filename.cpp:2250:52: error: 'ERROR_BAD_NETPATH' was not declared in this scope
if ( err == ERROR_FILE_NOT_FOUND || err == ERROR_BAD_NETPATH )
^~~~~~~~~~~~~~~~~
../../src/common/filename.cpp: In static member function 'static wxULongLong wxFileName::GetSize(const wxString&)':
../../src/common/filename.cpp:2902:58: error: 'NO_ERROR' was not declared in this scope
if ( ret == INVALID_FILE_SIZE && ::GetLastError() != NO_ERROR )
^~~~~~~~
makefile.gcc:12191: recipe for target 'gcc_mswudll\basedll_filename.o' failed
mingw32-make: *** [gcc_mswudll\basedll_filename.o] Error 1
Hi, I make programs that only use a small number of widgets. So I want to only pack the widgets that I use with my program. Currently there isn't an easy way to build a wxWidgets library file that only contains the needed widgets. This is why I ask that we come up with a solution to this problem.
What is the difference between those? I couldn't understand by just reading the docs, but it seems the event table (i guess) gives the class what are its specific event it should handle, and bind just bind a method to an id, but i still dont get it the difference between those and why/where using one or another.
Let me start by saying that I have never used wxWidgets before, so I'm not familiar with what it's capable of doing. Someone mentioned to me that they use this library for their project though, so I wanted to learn more about it.
I am reverse engineering a 1997 game that basically stores the design of their dialogs in a file as parameters (background art, font metrics, colors, controls types and positions, etc.), and then they read that from the file and draw their dialogs using that information.
I have reversed it enough that I can get all of that information from their file, and I was wondering if I would be able to dynamically create a dialog with controls using this information in wxWidgets?
I don't expect it to look identical to what they made, and I probably wouldn't use more than the position initially just to test it out as a proof of concept.
Hi guys am looking for a way to build my wxWidgets app for snapstore. Apparently I am able to build it on codeblocks. Writing the snap.yaml seems more of a challenge and am running short of tutorials to use for this course.
I am working on a project that uses wxWidgets and I want to use it directly in the project without building it. Any idea how can I do that? I have a clone of the repo and I am using CMake as build system.
I was debugging an issue on Bambu Studio (https://github.com/bambulab/BambuStudio) on macOS, and my impression is that these ENTER and LEAVE events do not fire as expected.
For a given window, I'm getting enter and leave as the mouse goes into the child windows of the given windows, but I'm not getting leave and enter as the mouse moves away from the window to other (its parent) window, nor am I seeing those events when the mouse completely leaves the app's window... It's really quite sporadic.
My general question is this (admittedly having zero experience with wxWidgets): Is it possible the framework is misbehaving at that level on macOS? Or is this more likely an app issue of some sort? How tested and refined is this on macOS?
While working on a project using wxWidgets, I recently ran into an issue with the Dialog Boxes. Below is a segment of code that I used to create and show a dialog box, for purposes of saving an XML file. **WITHOUT changing any code, my program now fails to display the dialog box each time. When ShowModal() is called, it simply returns the wxID_CANCEL code. I have determined that this issue is most likely caused by some sort of issue between MAC OS and wxWidgets, but I cannot deterime why. Any Help on how to fix this would be greatly appreciated!