Solved

OCX controls without MFC

Posted on 1998-09-07
4
388 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

16 Experts available now in Live!

Get 1:1 Help Now