Hi there,

I have not looked at C++ code for 7 years and so need a bit of help with this. I basically need to have a dll installed on a client machine. This dll will be called from another program. The dll will need to open a customed browser (basically I need to change it so that it looks more like an application than a browser), the dll will tell the browser the link to connect to. This will call a PHP script on a server which will then display as a normal site. I need to be able to control the focus of the browser window, so if the user presses the close button, it will hide the window, etc.

I have seen that you can achieve most of this using CHTMLView - my question here is how do you incorporate this into a dll? I am using Microsoft Visual studio to set up my projects.

Also is MFC the correct approach when this will be installed on a client machine, or does this even matter?

I have also looked at using IWebBrowser2, but I'm finding it hard to get clear examples!

As you can see I am in need of direction!

Thanks

What language is the main app written in? Presumably C++/MFC, so it makes sense to go with MFC for the DLL.
You don't say which version of Visual Studio you are using, but in general to create an MFC DLL, create a new project, select C++/MFC/MFC DLL.
Then you'll need to create the interface your main app is expecting and write your code. CHTMLView should be fine for the problem you've described.
You'll need to ensure that the redistributable runtime library for your version of Studio is installed on the client machine. This will provide the MFC support you need.

This article has been dead for over six months. Start a new discussion instead.