Windows classes need to be registered before they can be used (built-in
windows classes don't). This tells the operating system about your window.
programming - windows - windows class registrationAfter the windows class has been registered, instances of the window can
be created.
programming - windows - windows creationThe operating system interacts with a window by sending it messages. A
function is required to decode these messages and perform any actions
required in response. The address of this function is part of the
information provided to windows during registration.
programming - windows - windows message decodingIf you don't respond to the WM_DESTROY message, your window won't be
destroyed and your program will not close.
programming - windows - windows destructionAn attempt to list all the messages a user created window might see: