wxTaskBarIcon: Can't exit application if dialog is shown Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
chris_bern
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Mar 05, 2008 3:30 pm

wxTaskBarIcon: Can't exit application if dialog is shown

Post by chris_bern »

Hi,

When a modal dialog is shown in my application one cannot destroy the application using the taskbar menu command. To double check the issue I modified the wxTaskBarIcon Sample to show a wxMessageBox on the Dialog, the problem still occurs.

The source is attached.

Thanks,
Chris
Attachments
tbtest.h
(1.6 KiB) Downloaded 77 times
tbtest.cpp
(5.22 KiB) Downloaded 73 times
Chris
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Well, this makes sense to me. The main goal of a modal dialog is to show something that the user cannot overlook. If you want the app to still quit, you probably want a non-modal dialog

Alternatively, also look at :
http://docs.wxwidgets.org/stable/wx_wxt ... entappexit

Though I'm not sure if it's considered for modal stuff.
"Keyboard not detected. Press F1 to continue"
-- Windows
chris_bern
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Mar 05, 2008 3:30 pm

Post by chris_bern »

Thanks for the answer. I tried and it's not for modal.

As an alternative, I will hold a list of opened modal dialogs and destroy them manually on exit.
Chris
chris_bern
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Mar 05, 2008 3:30 pm

Post by chris_bern »

Or you have a better idea?
Chris
ChineseAlexander
Earned some good credits
Earned some good credits
Posts: 110
Joined: Fri Mar 31, 2006 6:05 am

Post by ChineseAlexander »

chris_bern wrote:Or you have a better idea?
here may work

Code: Select all

	wxProcess::Kill(::wxGetProcessId(),wxSIGKILL);
Post Reply