Home » Community » Newbie corner » 2 questions on ArrayCtrl and tray
2 questions on ArrayCtrl and tray [message #33430] |
Fri, 05 August 2011 07:35  |
|
Hello.
I have started study u++. And faced with 2 problems.
1. When I sorted column in ArrayCtrl pressing heading - numbers are sorted by increase/decrease. But when I sorted russian letters - its sorted not by an order.Have solved a problem or not?
2. For closing of my program I cause function
void PB::Exit() //при выходе
{
if(PromptOKCancel("Выйти?"))
{
SaveXML();
Close();
}
}
But when I cause this function from tray:
void PB::trayMenu(Bar& bar) //right click
{
bar.Add(t_("Показать"), THISBACK(Maximize));
bar.Add(t_("Скрыть"), THISBACK(Minimize));
bar.Add(t_("О программе..."), THISBACK(About));
bar.Add(t_("Выход"), THISBACK(Exit));
}
The program keeps the data, but isn't closed
When I close the form the program is closed correctly.
I don't understand in what a difference
P.S. Sorry for my English.
-
Attachment: sorted.jpg
(Size: 3.27KB, Downloaded 720 times)
[Updated on: Fri, 05 August 2011 07:45] Report message to a moderator
|
|
|
|
|
|
|
Re: 2 questions on ArrayCtrl and tray [message #33479 is a reply to message #33478] |
Fri, 12 August 2011 08:40   |
|
Hi!
I would swear that I answered your second question a while ago, but it seems like I never sent it
Anyway: The problem is that you call Close() in your Exit() method which just closes a window, while you should call Break() which closes the main execution loop which causes the app to exit. That's it, it is really simple As for the threads, don't worry about them if your application is singlethreaded.
You might also want to look at the GUI tutorial, example 7 clearly shows what you're trying to achieve 
Best regards,
Honza
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 20:30:59 CEST 2025
Total time taken to generate the page: 0.02932 seconds
|