The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

using mshtml

I am trying to use MSHTML in my own application. I found lots of tutorials on this but they are either snippets of code (not the whole enchilada), or they use MFC.

I also found a tutorial on CodeProject that uses pure C, but that's not good either as I am using C++.

Do you know how I can use this component with C++, but no MFC/ATL/etc?

I am pretty inexperienced with COM. Maybe that's the problem. Any pointers as to how I can get upto speed?

Thanks.
newbie
Wednesday, July 26, 2006
 
 
I have once tried to do use mshtml with C++ but without MFC/ATL and the like. You can find my findings on my website at
  http://www.adp-gmbh.ch/win/misc/mshtml/index.html

Warning: I have written this a long time ago and never used since, so I cannot guarantee that it is still usable or the links work as expected. You might give it a try, though.
René Nyffenegger
Wednesday, July 26, 2006
 
 
Rene

That's very helpful! Thank you very much!

The zip which has the source code does not seem to have DisplayHTML.cpp.  Do you have that file somewhere? If you find it, please message me from my email link and I'll give you my email.

Thanks again!!
newbie Send private email
Wednesday, July 26, 2006
 
 
I was able to get the project to build with VS2005, but it crashes somewhere in HTMLWindow. I think trying to do AddSink() kills it...
newbie Send private email
Wednesday, July 26, 2006
 
 
Rene,

I was able to get AddSink() to work, but I do have one question though. The reason AddSink() was dying was that there was a stack overflow caused by IIDAsString(). The question is when do you use IIDAsString()? There are a couple of places in the code (for example in HTMLWindow.cpp) where you do "std::string s = IIDAsString(riid);" but then string s never gets used anywhere else... Why is that? What does this accomplish?

Thank you!
newbie Send private email
Wednesday, July 26, 2006
 
 
Newbie,

As I mentioned, it's been a while since I've been working on mshtml, so from that distance, I am not able to answer your questions. But I know that at that time I managed to run the exe without crashing. But maybe you're doing something differently than I did. *IF* I manage to spare a little time on it, I will, but currently I am quite busy, so I cannot guarantee it.
René Nyffenegger
Thursday, July 27, 2006
 
 
I understand. Thank you very much!

If you do get a chance to look at it, please email me with whatever you find out.

Thanks again!
newbie Send private email
Thursday, July 27, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz