If you want a multiline textbox, you don't need to override
PreTranslateMessage
. All you have to do is dropping a classical
Edit Control
in your dialog and set its
Multiline and
Want Return properties to
true.
If you still want to use
PreTranslateMessage
to know when the user presses ALT+ENTER, then use this code:
BOOL CYourDialog::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_SYSCHAR && pMsg->wParam == VK_RETURN)
{
...
}
return CYourDialog::PreTranslateMessage(pMsg);
}