整了几个例子,最初的一个例子里面有个错误,以至于在模拟器上正常,在手机上无法显示,郁闷了好久。现在终于通了。
参考Series60_BouncingBall.zip的朋友们注意了。
{
// Force screen update: this required for WINS, but may
// not be for all hardware
iDirectScreenAccess->ScreenDevice()->Update();//位置错了
TRect sourceRect(iPosition,iBallImage->SizeInPixels());
iGc->Clear(sourceRect);
// Update the balls position
MoveBall();
// and draw ball
iGc->BitBlt(iPosition, iBallImage);
iClient.Flush();//可有可无
iDirectScreenAccess->ScreenDevice()->Update();//上面的那句应该在这里
// Renew request
After(TTimeIntervalMicroSeconds32(KGenerationInterval));
}