Re: How to catch web page script "moveto()" in CHtmlView?
From: jeff (bloodchen_at_hotmail.com)
Date: 04/25/04
- Next message: Henk: "Disabling onload focus"
- Previous message: Bernard: "How to control the font size in IE during printing"
- In reply to: Igor Tandetnik: "Re: How to catch web page script "moveto()" in CHtmlView?"
- Next in thread: Igor Tandetnik: "Re: How to catch web page script "moveto()" in CHtmlView?"
- Reply: Igor Tandetnik: "Re: How to catch web page script "moveto()" in CHtmlView?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 26 Apr 2004 00:45:27 +0800
Hi Igor,
I followed your instruction and set a breakpoint at my
CWebBrowser2::PreTranslateMessage function. But it seems the
WM_WINDOWPOSCHANGING never comes to this function. How do you catch it? May
I have a look of your sample code?
Thanks
"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:uxSu5kHKEHA.2456@TK2MSFTNGP12.phx.gbl...
> "Su Wei" <suwei@sina_com> wrote in message
> news:uJ7cPXHKEHA.2776@TK2MSFTNGP12.phx.gbl
> > I used spy++ and find that WM_WINDOWPOSCHANGING is always first sent
> > from "Shell Embedding". But I use "Shell Embedding" keywords to
> > search and no useful info available, so what's this window?
>
> It's the window of WebBrowser control. Its class name is undocumented,
> and you need not care about it (except maybe for debugging and research
> purposes). Like I said, the HWND of this window is available with
> IOleWindow::GetWindow.
>
> > and even
> > though I change popup window width and height according to Q259963,
> > the chtmlview still got scrollbars.
>
> I don't understand what you are saying. Q259963 shows how to determine
> the size WebBrowser control wants to have, not how to change it to what
> you want. Am I missing something?
>
> > I learn the ie control draws
> > scrollbars but how and when ie query width and height of his
> > container?
>
> Still no clue what you are talking about, sorry.
>
> I thought there's more than one trip but I don't know the
> > direction to dig in, such as IOleInPlaceSite, subclass and hook etc.
> > Below is code from mfc so the scrollbars is someborders special?
> > void CHtmlView::OnSize(UINT nType, int cx, int cy)
> > {
> > CFormView::OnSize(nType, cx, cy);
> >
> > if (::IsWindow(m_wndBrowser.m_hWnd))
> > {
> > // need to push non-client borders out of the client area
> > CRect rect;
> > GetClientRect(rect);
> > ::AdjustWindowRectEx(rect,
> > m_wndBrowser.GetStyle(), FALSE, WS_EX_CLIENTEDGE);
> > m_wndBrowser.SetWindowPos(NULL, rect.left, rect.top,
> > rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
> > }
> > }
>
> I don't see anything about scrollbars here. Whenever CHtmlView is
> resized, it resizes the WebBrowser control to completely cover the
> view's client area.
> --
> With best wishes,
> Igor Tandetnik
>
> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken
>
>
- Next message: Henk: "Disabling onload focus"
- Previous message: Bernard: "How to control the font size in IE during printing"
- In reply to: Igor Tandetnik: "Re: How to catch web page script "moveto()" in CHtmlView?"
- Next in thread: Igor Tandetnik: "Re: How to catch web page script "moveto()" in CHtmlView?"
- Reply: Igor Tandetnik: "Re: How to catch web page script "moveto()" in CHtmlView?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|