.reference

git-svn-id: svn://ultimatepp.org/upp/trunk@7726 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-09-25 10:19:04 +00:00
parent f01899f18a
commit dbcb75c8e7
3 changed files with 34 additions and 1 deletions

View file

@ -30,7 +30,8 @@ void App::Work()
break;
if(list.GetCount() > 100) {
bool quit;
Call(PTEBACK1(AskQuit, &quit));
Call(PTEBACK1(AskQuit, &quit)); // This is the generic way for any GUI (dlg)
// quit = PromptYesNo("Quit?"); // But Prompt has this ability already implemented
if(quit) {
Break();
return;

View file

@ -0,0 +1,11 @@
description "Prompt redirection\377";
uses
CtrlLib;
file
main.cpp;
mainconfig
"" = "GUI SSE2";

View file

@ -0,0 +1,21 @@
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
int MyPrompt(Callback1<const String&> WhenLink,
const char *title, const Image& iconbmp, const char *qtf, bool okcancel,
const char *button1, const char *button2, const char *button3,
int cx, Image im1, Image im2, Image im3)
{
LOG(title << ": " << qtf << "\n");
return IDCANCEL;
}
INITBLOCK {
RedirectPrompts(MyPrompt);
}
GUI_APP_MAIN
{
PromptYesNo("Test");
}