?
Solved

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

Posted on 1997-02-05
1
Medium Priority
?
813 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 400 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
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…

752 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