hasmet
asked on
ONOK wont work in a prop-page
I have a propertysheet with 4 pages.
I want return function locally in a control.
for example I have an edit control and when user enters while in it, I want to handle it
and still keep the sheet and page.
Only if they tab to ok button and return, then the dialog should close.
I want return function locally in a control.
for example I have an edit control and when user enters while in it, I want to handle it
and still keep the sheet and page.
Only if they tab to ok button and return, then the dialog should close.
Remove default property of UR property pages OK button.
ASKER
how ? I dont get it ?
ASKER
I am sorry, I have to reopen it, I just
can not understand your answer !
can not understand your answer !
Have you tryed overriding PreTranslateMessage?
You should be able to do something like
BOOL CPropPAge::PreTranslateMes sage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == WM_RETURN)
{
CWnd* pWnd = GetFocus();
if (::GetDlgCtrlID(pWnd->m_hW nd)) == MyControl)
{
// handle the return here
}
}
}
}
You should be able to do something like
BOOL CPropPAge::PreTranslateMes
{
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == WM_RETURN)
{
CWnd* pWnd = GetFocus();
if (::GetDlgCtrlID(pWnd->m_hW
{
// handle the return here
}
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.