Search found 19076 matches
- Tue Mar 19, 2024 6:23 am
- Forum: C++ Development
- Topic: How to make a child window of a wxFrame grow with the frame on resize?
- Replies: 1
- Views: 25
Re: How to make a child window of a wxFrame grow with the frame on resize?
Both variants should work (you should use GetParent()->GetClientSize() to be exact). Complete, working sample: #include <wx/wx.h> class MyApp : public wxApp { public: virtual bool OnInit(); }; wxIMPLEMENT_APP(MyApp); class MyFrame : public wxFrame { public: MyFrame() : wxFrame(NULL, wxID_ANY, "...
- Mon Mar 18, 2024 10:36 pm
- Forum: C++ Development
- Topic: StaticBoxSizer hidden name
- Replies: 7
- Views: 127
- Mon Mar 18, 2024 8:47 pm
- Forum: C++ Development
- Topic: Changing format of LogMessage
- Replies: 2
- Views: 28
Re: Changing format of LogMessage
Code: Select all
wxString LogFormatter::Format ( wxLogLevel level, const wxString& msg )
According to the documentation it has a different signature:
Code: Select all
wxString Format (wxLogLevel level, const wxString &msg, const wxLogRecordInfo &info) const
- Mon Mar 18, 2024 8:31 pm
- Forum: C++ Development
- Topic: StaticBoxSizer hidden name
- Replies: 7
- Views: 127
Re: StaticBoxSizer hidden name
The original screenshot looks like it uses a font scaling of around 200-300%. I don't know how this is handled under Linux, but can you try with default settings?
- Mon Mar 18, 2024 6:30 am
- Forum: General Development
- Topic: General way for console read text file in various Encodings
- Replies: 8
- Views: 160
Re: General way for console read text file in various Encodings
Did you check whether the problem lies in reading the file, or printing to console?
What happens if you use wxLogMessage() for the output?
What happens if you use wxLogMessage() for the output?
- Sun Mar 17, 2024 4:21 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
A wxFrame isn't shown automatically when created, so you must Show() it somewhere yourself.
- Sun Mar 17, 2024 3:06 pm
- Forum: General Development
- Topic: General way for console read text file in various Encodings
- Replies: 8
- Views: 160
Re: General way for console read text file in various Encodings
Reading any textfile using wxConvAuto usually works for me. Although i haven't tried all encodings you listed.
https://docs.wxwidgets.org/trunk/classwx_conv_auto.html
https://docs.wxwidgets.org/trunk/classwx_conv_auto.html
- Sun Mar 17, 2024 2:27 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
wxSplashScreen is quite limited, especially you can't update it while it's shown. So, useless in most scenarios.
- Sun Mar 17, 2024 2:23 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
Well then I guess, this is the problem. But when I call MyWorkerFunction, shouldn't the dialog remain open as long as the MyWorkerFunction takes to execute? Or could it be that I use Sleeps inside the MyWorkerFunction which prevent the dialog from being shown? I guess everthing in MyWorkerFunction ...
- Sun Mar 17, 2024 2:15 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
Yes, because it's a dialog on the stack, called with a (non-blocking) Show() call. So it gets destroyed when it goes out of scope.Wanderer82 wrote: ↑Sun Mar 17, 2024 2:13 pm As my main frame is shown it seems to close the dialog immediately.
- Sun Mar 17, 2024 2:14 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
Well, this is a stand-alone example. You need to extract the parts you need, the SplashScreen and the code to create and show it.With your code I get three errors:
- Sun Mar 17, 2024 2:03 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
Could someone explain to me, how an event handler is actually started? As it seems there is no explicit call for that. Not necessary. I still suspect that events are not handled, because there is a blocking call somewhere. But not calling "MyWorkerFunction" should have fixed that. So ther...
- Sun Mar 17, 2024 12:11 am
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
Just replace all occurrences of wxDialog with wxFrame in that class. Backup the files first, so you can go back later.Wanderer82 wrote: ↑Sun Mar 17, 2024 12:06 am Hm, how do I derive SplashScreen from a wxFrame? I mean, how do I have to change my code? I know, I'm in many things still a beginner
- Sat Mar 16, 2024 11:48 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
What happens inside MyWorkerFunction that would make the dialog show?Wanderer82 wrote: ↑Sat Mar 16, 2024 11:38 pm If I don't call MyWorkerFunction the dialog doesn't show up at all.
For a test, derive SplashScreen from wxFrame instead of wxDialog.
- Sat Mar 16, 2024 11:36 pm
- Forum: C++ Development
- Topic: Background image in wxDialog doesn't show up
- Replies: 30
- Views: 736
Re: Background image in wxDialog doesn't show up
I assume you're still not running a debug build? That would show an assert message if an image could not be loaded because of a missing image handler. Among many other useful asserts. The window is really black, it's because I set the background color to black in the splash screen dialog. So, I gues...