Krzysztof Mossakowski
Windows Programming
2008 - Tasks
Capturing a Part of the Screen
Demonstration
An application with one window containing the following elements:
An area for drawing the captured part of the screen
Pushing the left mouse button starts capturing the screen's part
Red frame is drawn using the XOR operation and is moved according to the mouse's movement
Size of the red frame is the same as the size of the area
(The information text visible in the demonstration is not required.)
The 'Refresh' button causes re-capturing the screen's part using the last used coordinates
The 'Close' button closes the window and terminates the application
Requirements:
No flickering
The window is resizable and its elements are repositioned in a 'smart' way (see the demonstration)
Use black colour for parts outside the screen
Hints:
SetROP2(), R2_XORPEN
Links for uploading:
Solutions
Corrections