This section
will tell you what is actually accomplished by the code you may
have already seen. The next one will discuss the code itself.
Ok, here is what we need to do:
Firstly, we
need to have the image of what's behind our window. We will store
it in a compatible DC and later copy parts of it. To get this
image, we will move the form outside the window, then copy the
area of the Desktop where our window was into our compatible DC
and then move our window back to its place.
We also need
a picture which will cover the whole window of ours. This picture
will have the same outlook as our form. To do this, we must have
the picture initially hidden, then copy the area of the Desktop
DC into a temporary memory DC. Next, display the picture above
all form controls and copy the contents of the temporary memory
DC onto it.
So far, we
have our form cover completely by a picture that simulates the
form and a compatible DC containing the Desktop behind our window.
Here is the
place to show some creativity. The example simply copies random
squares from the memory DC onto the picture, but you may surely
think out a more interesting effect.
And after
some loops, we end our application. This is it. It's not that
hard, is it?