Re: Windows 98 rendering problem using CDHtmlDialog

From: Johan Rosengren (johan.rosengren_at_telia.com)
Date: 05/18/04


Date: Tue, 18 May 2004 07:11:49 +0200

Jim,

Merely invalidating will not redraw the window (you have to trigger the
update as well), posting WM_PAINT is a no-no. RedrawWindow - as I stated in
my original post - will both invalidate and redraw. Forcing an image reload
with a timer is indeed rather ugly :-)))

Johan Rosengren
Abstrakt Mekanik AB

"Jim Howard" <jnhtx@spamcop.net> a écrit dans le message de
news:ORCIIzEPEHA.1312@TK2MSFTNGP12.phx.gbl...
>
> "Johan Rosengren" <johan.rosengren@telia.com> wrote in message
> news:%23oymiGxOEHA.1644@TK2MSFTNGP09.phx.gbl...
> > Jim,
> >
> > The world has enough nuts as it is, so it would be nice to be able to
help
> > you. On the other hand, invalidating a window is just a single call to
> > RedrawWindow, so I can't believe that this is your question, you are
> rather
> > asking when to redraw, I assume? Handlers such as OnDocumentComplete
> and/or
> > OnNavigateComplete would seem to be good starting points.
> >
> >
>
> If I just invalidate the CDHtmlDialog object, nothing happens:
>
> CDHtmlDialog *m_pMyDlg;
> // I put this next line at the end of my OnDocumentComplete handler, some
> images are just black "shadows"
> m_pMyDlg->Invalidate(); // shadow images not redrawn
>
> I've also tried variations of:
> HWND h = m_pMyDlg->m_pControlSite->m_hWnd;
> ::InvalidateRect(h, NULL, 1);
> BOOL b = ::PostMessage(h,WM_PAINT,0,0); //nothing :(
>
>
> A good solution would be a way to invalidate an image element in
> OnDocumentComplete but that doesn't seem possible.
>
> If I reload the images with the IWebBroswer2 pointer via a DHTML call such
> as SetInnerHtml then the problem occurs less frequently, but I still see
> it.
>
> The only sure fire fix so far is to fire a timer a second after
> OnDocumentComplete and then load similar but different images on to the
> page. This is super ugly.
>
> Thanks for answering, I truly appreciate it.
>
> Jim
>
>



Relevant Pages

  • Re: Windows 98 rendering problem using CDHtmlDialog
    ... Merely invalidating will not redraw the window (you have to trigger the ... my original post - will both invalidate and redraw. ... Handlers such as OnDocumentComplete ...
    (microsoft.public.vc.mfc)
  • Re: Graphics Performance Issue
    ... invalidate strategy might - I'm trying to figure out how to properly ... I'm making a dial gauge control, ... values show up as a needle moving around like in a physical pressure ... The redraw is fine when I use the graphics object to draw the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: More Interop
    ... public static extern bool InvalidateRect( ... Of course I can redraw the form using> Invalidate(), but how to I go about doing this for the entire screen. ... >> The event handler for the button which calls the RedrawWindow API is doing>> nothing that would seem to affect the state of the window. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: refresh static text overwriting old values -- Graphical problem
    ... You might get better results if instead of Invalidate(), ... a redraw of) the entire window, ... Call InvalidateRectwith a rectangle that is the union of the rectangle ...
    (microsoft.public.vc.mfc)
  • Re: CTabCtrl force background repaint
    ... Note that invalidate() forces everything to redraw, ... is redrawn *much* later than the Invalidate, possibly millions of instructions later. ... MVP Tips:http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)