MFC creates subclasses of derived classes

Problem description The
CXXView class has been created in MFC multi-document, and I want to derive its subclass.

Solution The
subclass of the derived class in MFC can be implemented by inheriting the CWnd method and then modifying the parent class.
1. ctrl+shift+X to call up the MFC class wizard, click to add a class.
Check Add Class2. Make sure that the base class of the new class is CWnd and add the corresponding class name.
Insert picture description here
3. Modify the inherited class name and corresponding corresponding in the generated class Relationship, so that the creation of subclasses of derived classes can be achieved.

Guess you like

Origin blog.csdn.net/qq_40247982/article/details/107364094