Outlook eating up delete keypress

U

UnKnoWn

Our VB6.0 Outlook addin loads a panel (written in VC++) containing an
internet explorer control in both the inspector and explorer views.
The internet explorer control displays an HTML file with a simple text
input. We faced similar issues with the backspace and delete key
events being eaten up by Outlook and not forwarded to the text input.
So we tried out a solution similar to the one posted by you, where we
used SetWindowsHookEx to catch the delete and backspace keypress
events and send appropriate messages to the panel window. While this
does seem to work for backspace in both the explorer and inspector
views, the delete keypress event *still* seems to be eaten up by
Outlook. This is what our callback for the SetWindowsHookEx looks
like :

LRESULT CALLBACK LowLevelKeyboardProc(INT nCode, WPARAM wParam, LPARAM
lParam){
LRESULT lRes;
KBDLLHOOKSTRUCT *pkbhs = (KBDLLHOOKSTRUCT *) lParam;

if ( pkbhs->vkCode == VK_DELETE || pkbhs->vkCode == VK_BACK)
{
if(outlook_mainwindow_Handle)
{
HWND panel = FindWindowEx(outlook_mainwindow_Handle, NULL, NULL, _T
("PanelDialog"));

if (panel)
{
HWND hWndCtl = ::GetFocus();
if:):IsChild(panel, hWndCtl))
{

if (wParam == WM_KEYDOWN)
{
::SendMessage(hWndCtl, WM_KEYDOWN, pkbhs->vkCode, 0);
}
return 1;
}
}
}
}

lRes = CallNextHookEx (0, nCode, wParam, lParam);
return lRes;
}

Any idea how we can get the delete key working?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top