testapp2.cpp

来自「一个小巧的嵌入式图形系统wGUI, 可以用VC编译」· C++ 代码 · 共 81 行

CPP
81
字号
// TestApp2.cpp//// test application for the wGui library////// Copyright (c) 2002 Rob Wiskow// rob-dev@boxedchaos.com//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public// License as published by the Free Software Foundation; either// version 2.1 of the License, or (at your option) any later version.//// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//#include "wgui.h"#include "TestView2.h"#include <iostream>using namespace std;class CTestApp : public wGui::CApplication{public:	CTestApp(int argc, char **argv) : CApplication(argc, argv) { m_pTestView = 0; }	~CTestApp(void) { delete m_pTestView; }	virtual void Init(void)	{		CApplication::Init();		m_pTestView = new CTestView();	}protected:	CTestView* m_pTestView;};int main(int argc, char **argv){	int iExitCode = EXIT_FAILURE;	try	{		CTestApp TestApp(argc, argv);		TestApp.Init();		TestApp.Exec();		iExitCode = TestApp.ExitCode();	}	catch (wGui::Wg_Ex_Base& e)	{		cerr << "Unhandled wGui exception : " << e.std_what() << endl;		exit(EXIT_FAILURE);	}	catch (exception& e)	{		cerr << "Unhandled std exception : " << e.what() << endl;		exit(EXIT_FAILURE);	}	catch (...)	{		cerr << "Unhandled exception." << endl;		exit(EXIT_FAILURE);	}	exit(iExitCode);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?