开发者

How to monitor screen updates?

I am trying to write a program that monitors when the screen has been redrawn. Meaning if any part of any window is redrawn, then the program is notified.

As far as I understand I should use a journal record hook like at http://www.vbaccelerator.com/home/vb/code/li开发者_Go百科braries/Hooks/Journal_Record_Hooks/article.asp

However, I do not understand which MSG type would get me the WM_PAINT events (WH_CALLWNDPROC and WH_CALLWNDPROCRET do not seem to do the job). I'm not even sure that WM_PAINT is what I'm looking for...

Basically, if I knew when the DC associated with GetDesktopWindow() has changed then my problem would be solved.

Question is: How do you monitor screen updates?


I don't believe this is possible without hooking the display driver. I can imagine there would be some serious performance implications if it were possible in general...


You would be better taking a screenshot every second or whatever. Every version of Windows has the little network icon in the tray always changing when you transfer data over a network, meaning the screen will be changing pretty much constantly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜