Anyone know whats happening here? I would prefer to catch the keystrokes and
then
make calls to appropriate browser functions or whatever.
Thanks
Eric
void __fastcall TForm3::FormKeyDown(TObject *Sender, WORD &Key, TShiftState
Shift)
{
ShowMessage(IntToStr(Key)); // for debug only
}
void __fastcall TForm3::FormKeyPress(TObject *Sender, char &Key)
{
ShowMessage("kp "+IntToStr(Key)); // for debug only
}
--
...
...
...This Post Has Been Tested and is Anthrax Free...
...
...
In general its not a good idea to investigate on events with ShowMessage
as it will generte other events. Better place it in a string or a memo.
Aaron Bockover once showed how to catch all events.
Hans.
// Place in the form's constructor:
Application->OnMessage = IEMessageHandler;
void __fastcall TForm1::IEMessageHandler(tagMSG &Msg, bool &Handled)
{
/*
Subject: Re: TcppWebrowser - Return Key does not work in TextArea object on web
page
Date: Sun, 7 Apr 2002 23:25:58 -0400
From: "Aaron Bockover" <ma...@aaronbock.net>
Newsgroups: borland.public.cppbuilder.internet
*/
// to find out whats going on, place a TMemo
if (Msg.message == WM_KEYDOWN || Msg.message == WM_KEYUP || Msg.message ==
WM_CHAR)
Memo2->Lines->Add ( "IEMessageHandler: " + IntToStr (Msg.message )
+ " " + IntToStr (Msg.wParam ) );
// This code is used to fix the <enter> problem in the IE Control ( for
textarea
if(Msg.message == WM_RBUTTONDOWN || Msg.message == WM_RBUTTONDBLCLK)
{
#define LEAVE_POPUP_MEMU
#if defined LEAVE_POPUP_MEMU
Handled = false;
#else
if(Msg.message == WM_RBUTTONDOWN ) ShowMessage (" WM_RBUTTONDOWN" );
if(Msg.message == WM_RBUTTONDBLCLK ) ShowMessage ("WM_RBUTTONDBLCLK" );
Handled = true;
#endif
}
else if(CppWebBrowser1
&& (Msg.message == WM_KEYDOWN || Msg.message == WM_KEYUP)
&& (Msg.wParam == VK_RETURN || Msg.wParam == VK_EXECUTE)
)
{
Handled = IsDialogMessage(CppWebBrowser1->Handle, &Msg);
if(Handled)
{
if (!OleInPlaceActiveObject)
{
CppWebBrowser1->Application->QueryInterface(
IID_IOleInPlaceActiveObject, (void**)&OleInPlaceActiveObject
);
}
if(OleInPlaceActiveObject)
{
OleInPlaceActiveObject->TranslateAccelerator(&Msg);
}
}
}
else
{
Handled = false;
}
}
--
...
...
...This Post Has Been Tested and is Anthrax Free...
...
...
"Hans Galema" <j.m.g...@maartens.nl> wrote in message
news:3D03126D...@maartens.nl...
I don't know.
Hans.
Please don't quote entire messages.