Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting CWebBrowser2 navigation result

Posted on 2009-05-08
1
Medium Priority
?
388 Views
Last Modified: 2013-11-20
Hi Experts,

I'm a novice in using CWebBrowser Active X Control.  
I would like to know the followings:
1. If I use the CWebBrowser2 Object in my MFC application, is it possible for others to run my application on their PC without IE 4 or later installed.  

2. I am using the CWebBrowser.Navigate() to send some HTTP/CGI command to a third party application, may I know how can I get the HTTP response received by the CWebBrowser object?  (For example, the third party application returns an HTTP 200 response with some text result string).  

Some simple code samples are greatly appreciated.
0
Comment
Question by:cskiong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 49

Accepted Solution

by:
DanRollins earned 1000 total points
ID: 24347680
The 200 response is a code in the headers, and as far as I know, the browser control does not directly expose the return headers. However, the rest of the response will be righ there in the "payload" -- the document text.
When you use a webrowser to access that page, what do you get on screen?
If you provide the URL, I'll see if I can give you more info.
Also:
There are alternate ways to get data from a web server. For instance, use the WinInet functions,
    About WinINet
    http://msdn.microsoft.com/en-us/library/aa383630(VS.85).aspx
which do provide access to the return headers (assuming you need that info -- you usually don't). Also, the
XMLHttpRequest object
http://msdn.microsoft.com/en-us/library/ms535874(VS.85).aspx
will also work simply and cleanly (ignore the word XML in the name -- it needs not use XML at all). After a response is received, you can easily access the headers using the getResponseHeader member function.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question