Solved

OCX controls without MFC

Posted on 1998-09-07
4
391 Views
Last Modified: 2013-12-04
I am trying to write a windows program without using MFC but I am having trouble understanding how to use the OCX controls, specifically the ms access calendar control. I am using VC++ 4.0 on win 950b.  I have used this control many times with MFC, clazzwizard automatically created the implementation files.  I don't want to use MFC because I am trying to create a small executable.(as a matter of fact I did use MFC at first and was dissatified with the size of the files needed for installation)
0
Comment
Question by:TheDragon
  • 2
  • 2
4 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 150 total points
ID: 1414262
That's not trivial. You have to write an ActiveX Control Container in order to use it. Look into the Platform SDK (or formerly ActiveX SDK) documentation about ActiveX Control Containers. I don't think it is worth doing so if you just want a smaller code. The size won't be reduced significantly.


"ActiveX Control Containers

The purpose of this topic is to provide guidelines for implementing containers that will interoperate well with other controls and containers. This document defines the minimum set of interfaces, methods, and features that are required of ActiveX™ containers to accomplish seamless and useful interoperability.

Overview
ActiveX Control Containers
General Guidelines
Related Topics"
0
 

Author Comment

by:TheDragon
ID: 1414263
I realize its not a trivial task, thats why I am asking 4 help.  And not just for this program but for pragramming windows in general.  I don't want to use MFC.  I don't like it and would prefer to just write windows programs in C++.  Unfortunately MS doesn't document well how to do certain task outside of MFC.

IF you can give me a fairly detailed outline of the steps I need to take to use a ocx control in a c++ program and any gotchas to watch out for I will give you the points.  Or even if you can point me at a single program somewhere out on the web that does it.  Closest I have found are programs that use OLE to connect/control  other running programs, but nothing that embeds a control in a program.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1414264
Besides the documentation I mentioned, here is an article

The Makings Of An OCX Container
http://users.neca.com/vmis/final1.htm

Although it uses MFC framework to build the program, it does implement the interfaces without using the readymade MFC ActiveX Control container.

Hope it helps.
0
 

Author Comment

by:TheDragon
ID: 1414265
I believe this is just what I was looking for, havn't had a chance to read completely through it but so far it seems to be heading in the same direction I am.

Thanks
Dragon
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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

20 Experts available now in Live!

Get 1:1 Help Now