WEB开发网
开发学院手机开发Symbian 开发 在Symbian exe 程序中显示图形 阅读

在Symbian exe 程序中显示图形

 2010-05-06 21:39:00 来源:WEB开发网   
核心提示:Displaying graphics in Symbian exe programs.在 Symbian exe 程序中显示图形Generally, exe programs are used to implement servers (exedll, epocexe target type) orsimple co

Displaying graphics in Symbian exe programs.

在 Symbian exe 程序中显示图形

Generally, exe programs are used to implement servers (exedll, epocexe target type) or

simple console programs. This may lead to believe that graphical features are not available

for exe programs. This is not the case, and even though it might take some extra work to

set up an appropriate environment, this is quite straight forward to achieve, as the

following snippet will illustrate. This way, we can make use of graphics without having to

resort on a full blown application.

通常,通常EXE程序(exedll, epocexe 类型)被用来实现服务器端或者是简单的控制台程序。所以使大家

认为图形化的特性对于exe程序是不必要的。事实上并非如此,甚至它需要做一些额外的工作来设置一个

适当的环境,就像下面将举例提到的,是十分方便的。

Our aim is to simply emulate the minimum set up provided by the framework when an

application (.app) is loaded. Being a dll, an application needs a process to attach to.

This is provided by AppRun.exe, which besides catering its own process and thread, calls

EikDll::RunAppInsideThread(), which -among other things- creates a CONE environment

(CCoeEnv)

我们的目标很简单,就是模拟当应用程序(.app)被加载时框架所提供的最小配置。作为一个DLL,应用程

序是需要一个进程去加载它的,AppRun.exe就是用来做这个的。AppRun.exe不仅为自己的进程和线程提

高资源,它还调用EikDll::RunAppInsideThread() ,建立一个CONE环境(CCoeEnv) 。

When a CONE Environment is created, it sets up a cleanup stack, active scheduler

(CCoeScheduler), and sessions to the file and window server (which can be later retrived by

calling CCoeEnv::FsSession() and CCoeEnv::WsSession()). Then it creates a screen, a window

group and a graphic context, among other things. Later, after the

1 2 3 4 5  下一页

Tags:Symbian exe 程序

编辑录入:coldstar [复制链接] [打 印]
赞助商链接