Home > Software engineering >  MFC class confusion
MFC class confusion

Time:09-30

Studied the c + + object-oriented mechanism, do not understand why the MFC class needs to inherit after binding
Use MFC class and the control of binding? Why do you want to inherit these classes in binding
Don't change after did inherit the parent class to reusable problems later? After inheriting polymorphic functions can be realized?

CodePudding user response:

CodePudding user response:

Bound to control the MFC class, also can you inherit, achieve more custom functions, and binding

CodePudding user response:

MFC old technology is more than a decade ago, why do so, it is suggested that to look at "is a simple MFC"

CodePudding user response:

In the parent class does not satisfy the requirements by inheritance, and add some special requirements,
Edit controls, for example, requires only allow input floating point Numbers, standard Edit control, can input characters, you can also limit the input Numbers (but we can not enter the decimal point), then you can Edit derived from a new class, the input character of judgment and filtering, in order to achieve the purpose of the

Bound controls, can obtain the access control of a handle, bound controls for a derived class and a subclass of process contained in

CodePudding user response:

Don't change after did inherit the parent class to reusable problems later? After inheriting polymorphic functions can be realized?

Inheritance cannot change after the parent class, intelligent extension parent
Inheritance, virtual function addresses are saved in a list, according to the derived class you use virtual function address (the address written to the virtual function table), so as to realize polymorphism
  • Related