As a solution, I show how to process Win32 messages through the WndProc method of the NativeWindow class. However, I have recently discovered that Control (and all classes descended from Control, such as Form) also implement a WndProc method, making use of the NativeWindow class unnecessary for this purpose.
A revised version of the CaptureLoss.cs [rename file after download] program (page 324) overrides the WndProc method to process WM_CAPTURECHANGED messages. The CaptureLossWindow class is no longer required in this file.
Similarly, a revised version of the EvenBetterBlockOut.cs [rename file after download] program (page 328) also overrides the WndProc method to process WM_CAPTURECHANGED messages. The CaptureLossNotifyWindow.cs file (page 327) is no longer required for the revised EvenBetterBlockOut program, and the entire discussion of interfaces (beginning on page 326) can be skipped unless the reader desires to learn something about interfaces.
© Charles Petzold, 2002
cp@charlespetzold.com
This page last updated March, 2002