Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting CWebBrowser2 navigation result

Posted on 2009-05-08
1
Medium Priority
?
393 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
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
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.

926 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