When I compile Wxwidgets apps on windows using g++ it’s GUI look old. After some research i found that’s called visual styles. I know i can use rc(manifest file) to disable visual styles. but i don’t know how to do that. After asking how to fix that on Chat-gpt it state that i need to add this “-DwxNO_WINDOWS_SETUP” to g++. it didn’t work.
Can anyone show me how to disable visual styles using rc(manifest file) on code below.
Hears a code Chat-gpt give me after asking another time how to disable visual theme. This didn’t work either.
#include <wx/wx.h>
#include <wx/sysopt.h>
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
class MyFrame : public wxFrame
{
public:
MyFrame(const wxString& title);
};
wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
// Disable default theme for wxWidgets windows
wxSystemOptions::SetOption("msw.disable.wxwindow.default.theme", 1);
// Create the main application window
MyFrame* frame = new MyFrame("Hello World");
frame->Show(true);
return true;
}
MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
{
// Your frame setup code here
}
This is the command line that i used to compile Wxwidgets apps.
g++ include/src/*.cpp *.cpp -pipe -I C:wxWidgetsinclude -I C:wxWidgetslibgcc810_x64_dllmswu -L C:wxWidgetslibgcc810_x64_dll -mwindows -lwxbase32u -lwxmsw32u_core -g -o build/debug/a.exe