This should be obvious, but I can’t find anywhere that spells it out.
I want to derive a MyCEdit from CEdit so I can override the OnChar handler and do useful things with keyboard input to an edit box. Each edit box I have fills the client area on a MyCPropertyPage (derived from CPropertyPage), and several such pages make up a tab control used to display diagnostics. I leave the edit boxes enabled and not read only (for aesthetics, not function).
In the resource editor (or elsewhere) how to I tell Visual Studio that I want a certain edit box to be a MyCEdit rather than a CEdit? Can I hope to just override the OnChar in MyCEdit to intercept characters… or do I have to override OnKeyDown as well – I have read a suggestion to this effect, but found no MS source article spelling out why.
So far, the only thing I can easily override is MCPropertyPage::OnChar… but that seems to get bypassed, and characters just go straight to the edit box child.
HI if i understand you need you can add simple edit to your page, then add control variable and write MyCEdit in class name field. And dont forget to set parent notify option in resource editor on your MCPropertyPage.