光标消失在bitblt上 [英] Cursor disappears on bitblt

查看:85
本文介绍了光标消失在bitblt上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows应用程序,该应用程序从屏幕上抓取像素以进行录制(以视频的形式)为自定义屏幕共享格式.问题是,在使用软件光标的计算机上,使用SRCCOPY | CAPTUREBLIT从屏幕上发亮(以便分层的窗口也显示在图像中),导致光标闪烁,如

I have a windows application that scrapes pixels from the screen for recording (in the form of a video) to a custom screen-sharing format. The problem is that on machines using a software cursor, blitting from the screen with SRCCOPY|CAPTUREBLIT (so that layered windows also show up in the image) causes the cursor to blink, as described in Case of the Disappearing Cursor.

对于单屏幕截图来说,这不是问题,但是当快速连续拍摄多幅屏幕截图时,光标会闪烁得如此之快,以至于有时似乎完全消失了.

For single screen shots, this is not a problem, but when multiple screen shots are taken in rapid succession, the cursor blinks so fast that it sometimes seems to disappear altogether.

我已经研究过使用Windows Media Encoder SDK(如代码项目文章中所述,请参阅下文),因为它不会导致光标闪烁,但是似乎无法直接访问帧数据.不幸的是,实时编码和自定义格式都是必需的,这使得Windows Media Encoder无法用于此目的.

I have looked into using the Windows Media Encoder SDK (as described in a codeproject article, see below) because it doesn't cause the cursor to blink, but there seems to be no way to directly access the frame data. Unfortunately, both real-time encoding and the custom format are both requirements, which makes windows Media Encoder unusable for this purpose.

我还尝试了DirectX方式(在同一篇文章中进行了介绍,请参见下文),而且似乎也遇到了相同的问题.

I have also tried the DirectX way (described in the same article, see below), and it seems to suffer from the same problem.

还有其他人遇到这个问题吗?必须有一种解决方法-许多商业屏幕共享程序都没有这种问题.

Has anyone else run into this problem? There must be a way around it - many commercial screen sharing programs have no such problem.

文章:www.codeproject.com/KB/dialog/screencap.aspx

article: www.codeproject.com/KB/dialog/screencap.aspx

推荐答案

您可以在Windows Vista或更高版本中使用Magnification API.我在Windows XP中找不到好主意.

you can use Magnification API in windows vista or later. i cannot find a good idea in windows xp.

这篇关于光标消失在bitblt上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆