At least, there are two possible entries :) :
class CBothContextableEdit : public CEdit
{
protected:
virtual void PreSubclassWindow() {
CEdit::PreSubclassWindow();
SetWindowText(_T("test"));
}
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct) {
int iResult(CEdit::OnCreate(lpCreateStruct));
if (GetSafeHwnd()) {
SetWindowText(_T("test"));
}
return iResult;
}
DECLARE_MESSAGE_MAP()
};