ultimatepp/reference/IdCtrls/main.cpp
cxl a29241911f reference: IdCtrls
git-svn-id: svn://ultimatepp.org/upp/trunk@5540 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2012-11-10 12:59:08 +00:00

35 lines
495 B
C++

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define LAYOUTFILE <IdCtrls/IdCtrls.lay>
#include <CtrlCore/lay.h>
struct Dialog : WithDialogLayout<TopWindow> {
typedef Dialog CLASSNAME;
IdCtrls ctrls;
Dialog();
};
Dialog::Dialog()
{
CtrlLayout(*this, "Dialog");
ctrls
("FIRSTNAME", firstname)
("LASTNAME", lastname)
("YEAR", year)
;
}
GUI_APP_MAIN
{
ValueMap m;
LoadFromJsonFile(m);
Dialog dlg;
dlg.ctrls.Set(m);
dlg.Execute();
StoreAsJsonFile(dlg.ctrls.Get());
}