krba
August 25th, 1999, 01:10 AM
If I use this code:
BOOL CAstbDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == VK_RETURN)
pMsg->wParam = VK_SPACE;
}
return CDialog::PreTranslateMessage(pMsg);
}
Stuff works OK. BUT(!) - why RETURN (which) becomes SPACE, after pressing not work just like SPACE.
If real SPACE is down, the button is still down. When SPACE releases then execute command under button?
Something like
pMsg->wParam = VK_SPACE+VK_RETURN;
BOOL CAstbDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == VK_RETURN)
pMsg->wParam = VK_SPACE;
}
return CDialog::PreTranslateMessage(pMsg);
}
Stuff works OK. BUT(!) - why RETURN (which) becomes SPACE, after pressing not work just like SPACE.
If real SPACE is down, the button is still down. When SPACE releases then execute command under button?
Something like
pMsg->wParam = VK_SPACE+VK_RETURN;