首页 > 代码库 > MinMax

MinMax

 1 //MinMax.cpp 2  3  4 #include "vcf/ApplicationKit/ApplicationKit.h" 5  6  7 using namespace VCF; 8  9 10 class MinMaxWindow : public Window {11 public:12     MinMaxWindow() {13         setCaption( "MinMax" );14 15         setMinWidth( 300 );16         setMinHeight( 200 );17         setMaxWidth( 400 );18         setMaxHeight( 600 );19     }20 21     virtual ~MinMaxWindow(){};22 23 };24 25 26 27 28 class MinMaxApplication : public Application {29 public:30 31     MinMaxApplication( int argc, char** argv ) : Application(argc, argv) {32 33     }34 35     virtual bool initRunningApplication(){36         bool result = Application::initRunningApplication();37         38         Window* mainWindow = new MinMaxWindow();39         setMainWindow(mainWindow);40         mainWindow->setBounds( &Rect( 100.0, 100.0, 500.0, 500.0 ) );41         mainWindow->show();42         43         return result;44     }45 46 };47 48 49 int main(int argc, char *argv[])50 {51     Application* app = new MinMaxApplication( argc, argv );52 53     Application::main();54     55     return 0;56 }

 

MinMax