From: Frank Perry on
Howdy,

I have a embedded web browser and want to scroll up and down from the view.
SetScrollPos doesn't seem to do anything at all. I tried GetScrollInfo but
it comes back with garbage for the size and position data, making me think it
is not talking to the actual scrollbar.

I'm using the code from "Programming Microsoft Visual C++ fifth addition" to
set up the browsers. I have a function that is run from the menu bar that
does the scroll.

m_target.SetScrollPos(SB_VERT, m_target.GetScrollPos(SB_VERT) + 50, true);

Any ideas?

Thanks in advance

Frank Perry

--
Frank Perry
LavaLeaf Software
From: jiangsheng[MVP] on
if m_target is a MFC wrapper of a webbrowser control, call
CWnd::GetControlUnknown and queryinterface for IWebBrowser2, and then get
IHTMLWindow2. If my memory does not betry me, IHTMLWindow2 has some
scrolling functions.

"Frank Perry" <FrankPerry(a)discussions.microsoft.com> ??????
news:D4C48C9F-03D7-41B2-92AF-F5FFC5611AD2(a)microsoft.com...
> Howdy,
>
> I have a embedded web browser and want to scroll up and down from the
view.
> SetScrollPos doesn't seem to do anything at all. I tried GetScrollInfo
but
> it comes back with garbage for the size and position data, making me think
it
> is not talking to the actual scrollbar.
>
> I'm using the code from "Programming Microsoft Visual C++ fifth addition"
to
> set up the browsers. I have a function that is run from the menu bar that
> does the scroll.
>
> m_target.SetScrollPos(SB_VERT, m_target.GetScrollPos(SB_VERT) + 50, true);
>
> Any ideas?
>
> Thanks in advance
>
> Frank Perry
>
> --
> Frank Perry
> LavaLeaf Software