timmay3141
Programmer
I'm trying to subclass CRichEditCtrl because I want to format numbers differently than characters. We'll call the subclass CMyEditCtrl. I follow the normal procedure (make a new class derived from CRichEditCtrl, change the necessary functions), but when I try to add a control with the ClassWizard, the only class that appears on the Variable Type combo box is CRichEditCtrl. I did the same exact procedure except derived from CEdit, and my subclass showed up in the combo box with CEdit, so I don't think the error is procedural. Regardless, I decided to make the control CRichEditCtrl so it would take care of some code for me, and then I went to the declaration and changed CRichEditCtrl to CMyEditCtrl and it worked fine. All I want to know is why it wouldn't let me select it the normal way. I'm going to have to add a lot of these controls - I could just do what I did here, but it's a bit inconvenient and I don't see why this should be happening.