I am trying to merge the best methods coming from two editor programs. One editor has the class structure defined as follows:
class A : public CRichEditView
And the other editor has the class defined as follows.
class B : public CView
Both of these classes have cursor movement methods.
The question is how to create a ?class structure? that will allow me to combine the two programs together.
One method I tried that does not work is to rename all instances of Class A to Class B for example, to rename all of
to functions that correspond to:
This methodology did not work because many of the window-handling interface to MS-Windows have different parameters in CView as opposed to CRichEdit, and the resulting program, when compiled, does not run.
I thought it would work since A and B have common ancestor classes, but some of the afx_nnnn functions differ in terms of parameter numbers between CRichEdit and CView, and it didn't work.
This might be a fundamental C++ question and may even go to the heart of why C++ is popular in the first place, but can anybody with experience of CRichEdit and CView tell me how to make one program that does the best of the two programs?