Solved

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

Posted on 1997-02-05
1
768 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the 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 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…

708 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

12 Experts available now in Live!

Get 1:1 Help Now