📄 console.h
字号:
// ===============================================================
// Console
// ===============================================================
// Simple framework for an EXE file that needs to output text on
// a console
// ===============================================================
// File: console.h
// OS: Symbian 6.1
// ===============================================================
// Copyright (c) 2002 - NewLC
// http://www.newlc.com
// ===============================================================
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
// ===============================================================
#ifndef _CONSOLEH
#define _CONSOLEH
#include <e32base.h>
#include <e32cons.h>
// A ptr on the console.
// This will allow your code to use the console from anywhere
// using console->xxx() calls
CConsoleBase* console;
// The entry point of the code that will use the console
LOCAL_C void ConsoleMainL();
// E32Main() is the starting point of any Symbian EXE.
// It is not that a good idea to put this code in a header
// file if you intend to develop a big application but it
// keeps simple exemples simple...
// [Note: that no cleanup stack is created. The main
// purpose of this code is simplicity]
TInt E32Main()
{
//
// Create a full screen console
//
console=Console::NewL(_L("Console"),TSize(KConsFullScreen,KConsFullScreen));
//
// Do my console program,
// and trap any error that may occurs in it
//
TInt Err;
TRAP(Err,ConsoleMainL());
if(Err)
console->Printf(_L("TRAP: Error(%d)\n"),Err);
//
// Wait the user to press any key before closing
//
console->Printf(_L("[Press any key]"));
console->Getch();
delete console;
return(0);
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -