您的位置:首页 > 其它

How to capture screen to bitmap如何实现截屏(Symbian)

2007-11-22 14:51 736 查看
How to capture screen to bitmap
From Forum Nokia Wiki
Capturing screen to in-memory bitmap is extremely easy. All you need is to create a bitmap instance with appropriate size

CWsScreenDevice* screenDev = CCoeEnv::Static()->ScreenDevice();
CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
CleanupStack::PushL( bitmap );
User::LeaveIfError( bitmap->Create( screenDev->SizeInPixels(),
 screenDev->DisplayMode() ) );

and then copy screen content into it as follows

User::LeaveIfError( screenDev->CopyScreenToBitmap( bitmap ) );
// use bitmap as appropriate, for example save it to file
 
CleanupStack::PopAndDestroy( bitmap );

This code links against fbscli.lib and ws32.lib  

转载自: http://wiki.forum.nokia.com/index.php/How_to_capture_screen_to_bitmap
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  symbian nokia user file
相关文章推荐