/************************************************************* ****************** ===STEP3.EXE=== ******************** ************************************************************* Copyright (c)1996 Grafik Software by Malcolm Taylor -> STEP3.CC -> Third tutorial step. */ #include "step3.h" DEFINE_RESPONSE_TABLE(MainMenu,AutoMenu) E_COMMAND(ID_FILE_NEW,CmFileNew) E_COMMAND(ID_FILE_EXIT,CmFileExit) END_RESPONSE_TABLE // The destructor for the main menu window. MainMenuWindow::~MainMenuWindow() { delete menu; } void MainMenu::CmFileNew() { Window *temp=new DrawWindow(50,50,250,200); temp->Paint(); temp->RefreshWindow(); } void MainMenu::CmFileExit() { ws.StopRunningEvents(); } void main(int argc,char *argv[]) { char *temp; ws.Init("tutorial.cfg"); // Initialise the system with tutorial.cfg MainMenuWindow Main; // Create the main menu window (and menu) ws.RefreshDesktop(); // Refresh (draw) the desktop ws.RunEvents(); // Start up the system event handling loops }