What is the right way to close a frame in wxWidgets Topic is solved
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
I have tried everything now buddy.
But nothing works. What do you suggest I should do?
But nothing works. What do you suggest I should do?
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
Can I mail you the code?
Would you be able to test it from your end?
Would you be able to test it from your end?
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
Can I mail you the code?
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
Hurray!
I solved the bug..
I just had to do a run around to my problem.
All I had to do was hide the Frame with this->Show(false);
Even that works like a charm!
Thanks bro!
I solved the bug..
I just had to do a run around to my problem.
All I had to do was hide the Frame with this->Show(false);
Even that works like a charm!
Thanks bro!
Re: What is the right way to close a frame in wxWidgets
That's not the same. The frame will still exist until you close the application.All I had to do was hide the Frame with this->Show(false);
Use the source, Luke!
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
Will I face any memory leaks or something like that?
Re: What is the right way to close a frame in wxWidgets
Not really, because all toplevel windows will be destroyed automatically when the application terminates. But if your app runs a long time, and the user creates that type for frame often, the used memory and GDI handles will accumulate over time. It's definitely not a good situation.
Use the source, Luke!
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
I have now done a re-installation of the wxWidgets and created a Fresh New Project.
I still am facing the issue.
What could be the problem? I think its the number of Controls that are contained in the Frames.
The Short Frame works fine.
But when the other 2 Bigger Frames just wont Close.
Please help......
I still am facing the issue.
What could be the problem? I think its the number of Controls that are contained in the Frames.
The Short Frame works fine.
But when the other 2 Bigger Frames just wont Close.
Please help......
Re: What is the right way to close a frame in wxWidgets
Hi,
Please create minimal reproducible test case and attach it here.
Also - why do you insist on using wxFrame instead of wxDialog?
Thank you.
Please create minimal reproducible test case and attach it here.
Also - why do you insist on using wxFrame instead of wxDialog?
Thank you.
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
I have created a minimal project.
Try closing the Create Contact Window after frame created.
I want an independent modeless window for creating Contacts.
Try closing the Create Contact Window after frame created.
I want an independent modeless window for creating Contacts.
- Attachments
-
- TestingShellForClose.rar
- attached the minimal project
- (426.71 KiB) Downloaded 94 times
Re: What is the right way to close a frame in wxWidgets
This sample works fine for me. So it must be something related to your build.
Which wxWidgets version are you using?
Which wxWidgets version are you using?
Use the source, Luke!
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
Are you sure that the application is not crashing?
When I close the contact window the application crashes.
I am using wxWidgets-3.1.4
wxMSW-3.1.4_gcc920TDM_Dev
wxWidgets-3.1.4-headers
When I close the contact window the application crashes.
I am using wxWidgets-3.1.4
wxMSW-3.1.4_gcc920TDM_Dev
wxWidgets-3.1.4-headers
Re: What is the right way to close a frame in wxWidgets
Yes
Here's the exe i created if you want to try it yourself. (Built with VS2017)
https://www.sendspace.com/file/tn84f6
Are you using the exact same compiler as the prebuilt binaries?sly_chandan wrote: ↑Thu Feb 18, 2021 6:36 pm I am using wxWidgets-3.1.4
wxMSW-3.1.4_gcc920TDM_Dev
wxWidgets-3.1.4-headers
If you can't find the error, i suggest to build the wxWidgets libraries yourself. That's the best way make to make sure they match your own code.
Use the source, Luke!
-
- Earned some good credits
- Posts: 116
- Joined: Fri Sep 25, 2015 2:33 pm
Re: What is the right way to close a frame in wxWidgets
The compilation seems fine. The sample applications run fine and also the shell application for wxwidgets works great.
It is just that my particular frame wont close.
what are the suggested binaries I need to use?
I am using the gcc (tdm64-1) 9.2.0
wxMSW-3.1.4_gcc920TDM_Dev
wxWidgets-3.1.4-headers
compilation command for wxWidgets is:
mingw32-make -j8 -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 VENDOR=custom MONOLITHIC=1
It is just that my particular frame wont close.
what are the suggested binaries I need to use?
I am using the gcc (tdm64-1) 9.2.0
wxMSW-3.1.4_gcc920TDM_Dev
wxWidgets-3.1.4-headers
compilation command for wxWidgets is:
mingw32-make -j8 -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 VENDOR=custom MONOLITHIC=1
Re: What is the right way to close a frame in wxWidgets
This indicates you were using the prebuilt libs.wxMSW-3.1.4_gcc920TDM_Dev
wxWidgets-3.1.4-headers
This says you built wxWidgets yourself.mingw32-make -j8 -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 VENDOR=custom MONOLITHIC=1
Which one is it?
Are you sure you're not including wx headers or libs from another wx version into your app?
Use the source, Luke!