Win32 questions
Will Dean
will.dean "at" industrial.demon.co.uk
Wed, 26 Jan 2000 17:10:47 +0000
At 08:47 26/01/2000 -0600, you wrote:
>I have followed the WinVNC design but instead of doing screen snapshots
>every 1ms, I'm doing them only on paint events to the screen. My
>understanding is that WinVNC takes a full snapshot using BitBlt() then
>computes if there are any differences. What puzzles me is the hooks that
>are setup. There is a hook for WM_PAINT events. What does this hook do
>that is different from the screen snapshot that is occurring every ms?
A full screen blit from screen to system ram typically takes several
hundred ms on a good PC with a good video card.
Rest assured that it isn't done every millisecond!
WinVNC uses a full message hook to try and catch all the messages which are
likely to result in the screen changing. (WM_PAINT is the main one, but
not the only place that applications draw.)
From hooking the message, it works out a list of rectangles which should
be blitted up into RAM - these are then compared against a full-screen
shadow buffer and the areas which have changed are encoded.
No messages can be hooked on console windows, which is why the default
settings choose to poll foreground console windows. This polling is a
maximum interval of one second, but typically happens a fair bit more often
because of, um, implementation details.
HTH,
Will
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------