// Application main form file. // Original file name: test_uphoneMainForm.cpp // Generated by TOPS Builder:Project wizard,Date:2010-7-26 #include "test_uphoneMainForm.h" #include "TG3.h" #include "ssMsgQueue.h" #include "CCTouchDelegateProtocol.h" using namespace cocos2d; TMainForm::TMainForm(TApplication * pApp) : CCXEGLView(pApp) { TRectangle rcWnd(0, 0, pApp->GetScreenWidth(), pApp->GetScreenHeight()); Create(&rcWnd); } TMainForm::~TMainForm() { } Boolean TMainForm::EventHandler(TApplication * pApp, EventType * pEvent) { Boolean bHandled = FALSE; switch(pEvent->eType) { case EVENT_WinInit: { // do some thing bHandled = TRUE; } break; case EVENT_CtrlSelect: { //switch(pEvent->sParam1) //{ //case RES_SYSTEM_WINDOW_TITLE_BUTTON_ID: // bHandled = TRUE; // break; //} } break; case EVENT_WinClose: { // Stop the application since the main form has been closed pApp->SendStopEvent(); bHandled = TRUE; } break; } if (FALSE == bHandled) { return CCXEGLView::EventHandler(pApp,pEvent); } return bHandled; }