Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Andrea Cremonini
Mon, 24 Sep 2007 13:20
CppWebBrowser scroll html page
Author: Andrea Cremonini
Date: Mon, 24 Sep 2007 13:20
Date: Mon, 24 Sep 2007 13:20
11 lines
1112 bytes
1112 bytes
Hi, I'm using TCppWebBrowser with C++ Builder 5 Pro... I have to scroll html page inside the component by buttons on my form, but I don't know how can I do... Please help me. Thanks in advance. Andrea
Re: CppWebBrowser scroll html page
Author: Mark Jacobs
Date: Thu, 27 Sep 2007 12:34
Date: Thu, 27 Sep 2007 12:34
32 lines
2103 bytes
2103 bytes
"Andrea Cremonini" <andrea@jpolis.com> wrote in message
news:46f7b98e$1@newsgroups.borland.com...
> I'm using TCppWebBrowser with C++ Builder 5 Pro...
> I have to scroll html page inside the component by buttons on my form,
> but I don't know how can I do...
Here is a routine that generically scrolls any control with a vertical
scrollbar up or down :-
void scrllctrl(TWinControl *mjctl,bool goup)
{
tagPOINT mpt,clcrds;
GetCursorPos(&mpt);
clcrds.x=mjctl->Width-7;
clcrds.y = (goup) ? 7 : mjctl->Height-7;
ClientToScreen(mjctl->Handle,&clcrds);
SetCursorPos(clcrds.x,clcrds.y);
mouse_event(MOUSEEVENTF_LEFTDOWN,clcrds.x,clcrds.y,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,clcrds.x,clcrds.y,0,0);
Application->ProcessMessages();
SetCursorPos(mpt.x,mpt.y);
}
Simply use
scrllctrl(CppWebBrowser1,true); to scroll it up and
scrllctrl(CppWebBrowser1,false); to scroll it down.
HTH,
--
Mark Jacobs
DK Computing
http://www.dkcomputing.co.uk
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads