Solved

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

Posted on 1997-02-05
1
800 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…

691 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