Solved

Getting CWebBrowser2 navigation result

Posted on 2009-05-08
1
372 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 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Specify pages breaks in Chrome 5 43
lucky13 challenge 11 120
no14 challenge 14 62
wait notify demo infinite loop 3 95
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.

914 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now