I have been using the MyTabCtrl from the CoderSource.Net site. To stop the dialog closing when Escape or Enter keys are pressed it says to add the following routine:-
BOOL CTabOne:reTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN)
{
if(pMsg->wParam==VK_RETURN || pMsg->wParam==VK_ESCAPE)
pMsg->wParam=NULL ;
}
return CDialog:reTranslateMessage(pMsg);
}
That works fine.
My question is what code do you need to include to get the Escape and Enter keys acting like the Tab key was pressed when the user was in a Edit control.
Many thanks,
Porto.
BOOL CTabOne:reTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN)
{
if(pMsg->wParam==VK_RETURN || pMsg->wParam==VK_ESCAPE)
pMsg->wParam=NULL ;
}
return CDialog:reTranslateMessage(pMsg);
}
That works fine.
My question is what code do you need to include to get the Escape and Enter keys acting like the Tab key was pressed when the user was in a Edit control.
Many thanks,
Porto.