Solved

OCX controls without MFC

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

773 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