ultimatepp/uppdev/PopUp2p/main.cpp
cxl 351994a6cc Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

34 lines
512 B
C++

#include <CtrlLib/CtrlLib.h>
struct PopUp2 : StaticRect {
PopUp2() { Color(SRed); }
};
struct PopUp1 : StaticRect
{
PopUp2 p2;
virtual void LeftDown(Point, dword) {
p2.SetRect(100, 100, 100, 100);
if(!p2.IsOpen())
p2.PopUp(this);
}
PopUp1() { Color(SBlue); }
};
struct MyCtrl : TopWindow
{
PopUp1 p1;
virtual void LeftDown(Point, dword) {
p1.SetRect(150, 150, 100, 100);
if(!p1.IsOpen())
p1.PopUp(this);
}
};
GUI_APP_MAIN
{
MyCtrl().Run();
}