First, let me clarify:
I know nomenclature can be confusing. Windows class has nothing to do with MFC/C++ classes.
To create window that is not Windows common control one must register own window class filling WNDCLASS or WNDCLASSEX structure and call RegisterClass or RegisterClassEx.
Window class not only sets behavior of the window but it sets windows procedure that handles all Windows messages.

If you want to use Window controls and control behavior, you would have to subclass this control. What it means,you replace control’s window procedure with your own to handle some messages or call original procedure.

When MFC creates window it passes own procedure address. For Window controls it subclasses each newly created controls.

This attaches control to an MFC object so you can use MFC wrappers.

Asigning variable to a dialog’s control transparently subclasses this control with MFC procedure. This attaches control (window) to a class of your chice (MFC or derived) giving you ability to handle control’s messages.

For exapmple: Dialog butto’s window class name is BUTTON. You could use any MFC class to attach button window to the object of this class; however, CButton is most appropriate, since it was specifically designed to suppoer button functionality.