HTTP

The HTTP sample demonstrates the use of the Microsoft Foundation Classes for Windows CE internet classes. This application allows you to download the HTML text stored at a specified web site and to display this text in a window.

To retrieve the HTML text from a given Web site, enter the full URL of the Web site in the edit control at the top of the HTTP window and press the Download button. The html text from the selected Web site will appear in the large edit control at the bottom of the page. The application displays status information and error messages in the edit box in the middle of the page.

HTTP should function correctly in any environment where Pocket Internet Explorer works. This application retrieves the same html text that you would see if you visited the site with Internet Explorer and selected View Source.

This sample demonstrates the following keywords:

CDialog::DoModal CString::Find
CHttpConnection::OpenRequest CWinApp::LoadIcon
CHttpFile::AddRequestHeaders CWinThread::m_pMainWnd
CHttpFile::QueryInfo CWnd::CenterWindow
CHttpFile::QueryInfoStatusCode CWnd::DoDataExchange
CHttpFile::SendRequest CWnd::GetDlgItemText
CInternetFile::Close CWnd::SetDlgItemText
CInternetSession::Close CWnd::SetIcon
CInternetSession::EnableStatusCallback AfxGetApp
CInternetSession::GetHttpConnection AfxParseURL
CInternetSession::OnStatusCallback  

You can find the HTTP project files in the Wce\Samples\Mfc\HTTP directory.

For information on the Windows CE platforms that support this sample, see MFC for Windows CE Samples.