refreshing contents on the htmlviewer

refreshing contents on the htmlviewer

Post by Jay McLain [MSFT » Wed, 09 Jul 2003 00:31:33



On Pocket PC 2000 and Pocket PC 2002, there is no way to specify this
operation. You might be able to get similar behavior (if you don't mind a
'blank' screen for a moment), by sending a DTM_CLEAR,
SetWindowText(TEXT(""), ...), or DTM_NAVIGATE to "about:blank" before going
to the URL. This should force a refresh (assuming that the HTTP headers have
not specified that the content expires sometime in the future), though I
haven't tried them.

On Pocket PC 2003, you can specify NAVIGATEFLAG_REFRESH (defined in
htmlctrl.h) in the WPARAM of the DTM_NAVIGATE message.

--
___________________________________
Jay McLain
Software Development Lead - Pocket IE
Mobile Devices Division
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


> What I'd like to do is very simple.
> My browser call SendMessage like below.
> Then it seems that htmlview looks for local cached file
> from the Pocket PC.
> This is not what I want.

> The image on the server changes every one minute, for
> example.
> So, users have to click refresh button to reload new
> image.

> So, I want to change default action to reload image.
>       or I look for some method to notify htmlviewer to
> reload image.

>  m_bstrURL = TEXT("http://www.testxxx.com/1.jpg");
>  SendMessage(hwndHTML, DTM_NAVIGATE, 0, (LPARAM)
> m_bstrURL);

> ============ old question =======================
> Subject:   Re: refreshing contents
> From:   "Jay McLain [MSFT]"

> 3:55:31 PM

> Not sure I quite understand what you are asking. Do you
> want to refresh the
> image in the HTML control when it changes on the server?

> --
> ___________________________________
> Jay McLain
> Software Development Lead - Pocket IE
> Mobile Devices Division
> Microsoft Corporation

> This posting is provided "AS IS" with no warranties, and
> confers no rights.



> > i wrote my own browserlike program to show some graphics
> > after using htmlviewer control.

> > it seems works.

> > however, i want refresh the contents everytime access
> > this file automatically.

> > pls recommend good method for this.

> > my code
> > ===========

> > VERIFY(InitHTMLControl(hInstance));
> > CreateHTMLView();

> > m_bstrURL = TEXT("http://www.testxxx.com/1.jpg");
> > SendMessage(hwndHTML, DTM_NAVIGATE, 0, (LPARAM)
> m_bstrURL);

> >     MSG msg;
> >     while (GetMessage(&msg, NULL, 0, 0))
> >     {
> >             TranslateMessage(&msg);
> >             DispatchMessage(&msg);
> >     }
> >     return 0;
> > ==========================================

 
 
 

1. refreshing contents

Not sure I quite understand what you are asking. Do you want to refresh the
image in the HTML control when it changes on the server?

--
___________________________________
Jay McLain
Software Development Lead - Pocket IE
Mobile Devices Division
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


2. v.90 improvements....

3. htmlviewer.dll

4. 1186 PC Emulation

5. VPN problem with IE or HTMLViewer

6. WinHTTP and Sharepoint Error

7. SetImage in HTMLViewer

8. ANN: snk test 1.0

9. Refresh Today Screen

10. Refresh of Inbox

11. SD Card Refresh problem anyone can help??

12. Today Screen Refresh Problem

13. HELP: refreshing today theme