I am creating a MFC program using the document/view architecture. In the view I call on a cell class that extends CEdit to draw a text box. That works fine, however, when I try to catch a lose focus message for that text box nothing happens. I tried to overwrite PreTranslateMessage but that didn't work.
Here's the code in the CGridView.cpp class:
void CGridView::OnInsertText()
{
CWnd* pParentWnd = this;
CellText* pEdit = new CellText(&grid, pParentWnd);
Invalidate();
UpdateWindow();
}
the CellText.cpp:
CellText::CellText(Grid *pgrid, CWnd* pParentWnd)
{
int *pcoordinates = pgrid->GetSelectedCellCoodrinates();
cedit.Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, CRect(*pcoordinates+10, *(pcoordinates+1)+10, *(pcoord