Window Objects: Overview

How Do IDetailsTutorial

MFC supplies class to encapsulate the HWND handle of a window. The CWnd object is a C++ window object, distinct from the HWND that represents a Windows window but containing it. Use CWnd to derive your own child window classes, or use one of the many MFC classes derived from CWnd. Class CWnd is the base class for all windows, including frame windows, dialog boxes, child windows, controls, and control bars such as toolbars.

MFC uses classes , , and to represent single document interface (SDI) and multiple document interface (MDI) frame windows

MFC manages windows, but you can derive your own classes and use CWnd member functions to customize these windows. You can create child windows by constructing a CWnd object and calling its member function, then manage the child windows with other CWnd member functions. You can embed objects derived from , such as form views or tree views, in a frame window. And you can support multiple views of your documents via splitter panes, supplied by class .

Each object derived from class CWnd contains a message map, through which you can map Windows messages or command IDs to your own handler functions for them.

What do you want to know more about?