yarek
asked on
How to get changed parts of screen: get nvalidate
I am trying to make a screen capture software.
I do not want to capture ALL the screen, but only the parts of the screens that has been changed.
is there a function/ component / Api to determine what part of screen has been redrawn/changed ?
regards
I do not want to capture ALL the screen, but only the parts of the screens that has been changed.
is there a function/ component / Api to determine what part of screen has been redrawn/changed ?
regards
ASKER
we do capture first screen entirely.
Then every X ms, get the rectangles x1,y1,x2,y2 coordinates of the changed area since the latest capture.
I do not care about mouse and keyboard.
regards
Then every X ms, get the rectangles x1,y1,x2,y2 coordinates of the changed area since the latest capture.
I do not care about mouse and keyboard.
regards
Following my previous suggestion you would take your next screen capture and compare the two. You are then generating the list of rectangles that make up the list of changes. I have to admit that not using the keyboard and mouse hooks will simplify things.
Trying to make a fast comparison routine for a screen full of information is an art form that would be best addressed by video game programmers. If you can offload the comparison processing to the video card you would minimize the impact to the processor usage.
Whether you use that approach or stick to Windows API is a decision only you can make. Do you need it to run on any and all hardware?
Let me know.
Trying to make a fast comparison routine for a screen full of information is an art form that would be best addressed by video game programmers. If you can offload the comparison processing to the video card you would minimize the impact to the processor usage.
Whether you use that approach or stick to Windows API is a decision only you can make. Do you need it to run on any and all hardware?
Let me know.
ASKER
I am just looking for functions to get these x1,y1,x2,y2 coordinates !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Coding based around this would mean that you would need to take a screen capture and periodically take another screen capture. Compare A to B and the pixels that differ map to your changed area.
You could set up a global keyboard and mouse hook since most changes are user triggered. This would give you an event that could trigger your capture early. There is an API that allows a program to capture all of the inputs for a recording... the name escapes me at the moment. You would need to be aware though that basing your screen capture solely off of user input would not work if you were capturing a movie playing (no user input).
Global keyboard and mouse hooks generally require you to write a DLL too...
If you would like me to try to come up with more specifics on the API's, let me know.