Solved

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

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

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…

930 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

18 Experts available now in Live!

Get 1:1 Help Now