Solved

How: OCX to display "Hello World" in Internet Explorer?

Posted on 1997-02-05
1
782 Views
Last Modified: 2013-12-03
Hi,

I need to know how I would set about making an OCX /ActiveX control that will simply display the text "hello world" in Internet Explorer.

I have the html side down pat, and I even have a basic dll/ocx that is loading.

Now the hard part: I am programming this is straight C++, that is no VB or MFC based answers... I also want to do this myself, so no ATL even.

The question then is, given that I have a "working" OCX that has only the IUnknown interface, that is currently (successfully) being loaded by internet explorer, what interfaces do I add and what do I do in them to make IE actually give me a dc to paint on?

Have fun with this one!
0
Comment
Question by:Kyrie
1 Comment
 
LVL 11

Accepted Solution

by:
mikeblas earned 200 total points
ID: 1298942
The ActiveX SDK goes a long way to identifying the additional interfaces you need.  Something that implements only IUnknown really isn't a control--it's just a COM object.  (Unfortunately, the documentation says exactly the opposite; it's not really a very .) A control also is embeddable, which means it implements other interfaces like IOleObject and IViewObject.

The topic "What Support for an Interface Means" in the topic "ActiveX Control and Control container guidelines" in the SDK documentation enumerates all of the interfaces a control may or may not support.  The OLE documentation describes how those interfaces are implemented. Kraig Brocksmidt's book, "Inside OLE", implements an OLE control from scratch without using MFC.

To present a drawing interface, you'll need IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IDataObject, and IViewObject.

This'll be a great exercise: after you complete it, you'll have a great respect for all the work that MFC or ATL do for you in control creation.

.B ekiM

0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

831 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