|
-
July 2nd, 1999, 03:14 AM
#1
Enter-button override
I overrided my SDI-FormView-View with PreTransLateMessage(MSG* pMsg), so I was able to override my left and right arrows. Now I want to override my Return&Enter buttons, but I do not know the Virtual Key Code. Can U help me out?
Student Flanders Language Valley
Programmer
-
July 2nd, 1999, 03:19 AM
#2
Re: Enter-button override
The code for enter is VK_ENTER.
Sasa
-
July 2nd, 1999, 04:10 AM
#3
Re: Enter-button override
Sasa, It's not working! The following function gives an error on VK_ENTER(undeclared identifier):
BOOL CMenuutjeView::PreTranslateMessage(MSG* pMsg)
{
CMenuutjeDoc* pDoc=GetDocument();
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message == WM_KEYDOWN)
{
bool bProcessed = false;
if (pMsg->wParam == VK_LEFT)
{
bProcessed = true;
pDoc->Verschuif(false);
Invalidate();
}
if (pMsg->wParam == VK_RIGHT)
{
bProcessed = true;
pDoc->Verschuif(true);
Invalidate();
}
if (pMsg->wParam == VK_ENTER)
{
bProcessed = true;
MessageBox("ENTER");
OnEnter();
}
if (bProcessed)
return true;
}
return CFormView::PreTranslateMessage(pMsg);
}
What could possibly be the problem?
Student Flanders Language Valley
Programmer
-
July 2nd, 1999, 04:18 AM
#4
Re: Enter-button override
-
July 2nd, 1999, 04:33 AM
#5
Re: Enter-button override
I just suggested to use VK_ENTER, but I didn't said how to do it.
Greetings, Sasa
-
July 2nd, 1999, 04:35 AM
#6
Re: Enter-button override
Virtual key VK_RETURN does not exist.
Sasa
-
July 2nd, 1999, 04:37 AM
#7
Re: Enter-button override
I use VK_RETURN in my PreTranslateMessage. So it does exist !
-
July 2nd, 1999, 04:46 AM
#8
Re: Enter-button override
Thanx, Franky, VK_RETURN works just fine!
Thanx to you too, Sasa!
Student Flanders Language Valley
Programmer
-
July 2nd, 1999, 05:14 AM
#9
Re: Enter-button override
Sorry, i've searched for it MSDN Library and VK_RETURN isn't there.
Sasa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|