Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

OCX controls without MFC

Posted on 1998-09-07
4
Medium Priority
?
404 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 450 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

971 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