Navigational keys in OLE Controls
Peter -- peter@abaris.se
Tuesday, April 30, 1996
Environment: VC 4.0, NT 3.51 SP3, 120 MHz Pentium 48 MB, VB 4.0
Hi,
I have a problem with my OLE control and handling the arrow keys. My control
is a grid which should handle movement by using the arrow keys, but in my
container (VB 4.0) this doesn't seem to work. I've tried to implement the
OnGetControlInfo function, but that doesn't get called either. My question
is:
Could some point me to a place where I can find information about OLE
controls and navigational keys. Some sample code would be great. I'm sure
this isn't complicated but...
Peter Bryntesson
Abaris AB
Sweden
Julius Hamelberg -- jhamelberg@dca.com
Wednesday, May 01, 1996
You might need to override the PreTranslateMessage member function.
Something like:
----------------------------------------------------------------
BOOL CYourCtrl::PreTranslateMessage(LPMSG lpMsg)
{
switch (lpMsg->message)
{
case WM_KEYDOWN:
case WM_KEYUP:
switch (lpMsg->wParam)
{
case VK_UP:
case VK_DOWN:
case VK_LEFT:
case VK_RIGHT:
SendMessage(lpMsg->message,lpMsg->wParam,lpMsg->lParam);
return TRUE;
}
break;
}
return COleControl::PreTranslateMessage(lpMsg);
}
----------------------------------------------------------------------
There are some knowledge base articles on this but I don't know their
exact reference numbers.
Hope this helps.
Julius.
(jhamelberg@dca.com)
______________________________ Reply Separator _________________________________
Subject: Navigational keys in OLE Controls
Author: mfc-l@netcom.com at Internet
Date: 5/1/96 5:21 AM
Environment: VC 4.0, NT 3.51 SP3, 120 MHz Pentium 48 MB, VB 4.0
Hi,
I have a problem with my OLE control and handling the arrow keys. My control
is a grid which should handle movement by using the arrow keys, but in my
container (VB 4.0) this doesn't seem to work. I've tried to implement the
OnGetControlInfo function, but that doesn't get called either. My question
is:
Could some point me to a place where I can find information about OLE
controls and navigational keys. Some sample code would be great. I'm sure
this isn't complicated but...
Peter Bryntesson
Abaris AB
Sweden
| Вернуться в корень Архива
|