Solved

How do I do COM and ActiveX with Win32

Posted on 2002-07-17
5
480 Views
Last Modified: 2013-11-25
Dear Expert-Exchange Friends

I’ll keep this short and simple.

When using VC++ Win32 programming, as in, no heavy MFC involved at all, how do you create or instantiate ActiveX controls? Will I be using CreateWindowEx()? What is the procedure of instantiating COM objects such as MSFlexGrids and all the other funky ActiveX controls that are not standard things like buttons, edit boxes etc.

How do I on the other hand create my own custom ActiveX controls?

I know this is not easy without MFC, but harder the work, the better the experience gained. In fact, I think MFC sucks, its too bulky and the heavy overhead drives me beyond insanity.

I would love it if you guys could direct me to some cool links.

Thanx plenty
0
Comment
Question by:josamoto
[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
5 Comments
 
LVL 7

Accepted Solution

by:
jimwasson earned 100 total points
ID: 7161257
Chapter 3 of the WROX book "Professional COM Applications with ATL" by Sing Li and Panos Economopoulos goes through writing a simple ActiveX control from scratch -- no MFC or ATL (until chapter 4).
0
 
LVL 3

Expert Comment

by:jtm111
ID: 7162132
I first started programming COM a few years ago using VC++ Active Template Library (ATL). It is very good. I got a good jump-start from the following link:

http://www.microsoft.com/com/news/drgui.asp

You will be up and running simple components today if you start with the tutorial:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnguion/html/msdn_093098.asp

My advice to you is to start by using ATL, but read the code that the ATL wizard generates so you can see what is going on.
0
 
LVL 3

Expert Comment

by:jtm111
ID: 7162149
Also, this book proved valuable to me, especially in explaining how to write a full control with ATL without MFC.

http://www.amazon.com/exec/obidos/ASIN/1861001207/idevresource/002-8754167-2514431


Another book I found very helpful is this one:

http://www.amazon.com/exec/obidos/ASIN/0672315351/kermanenterprise/002-8754167-2514431


0
 
LVL 11

Expert Comment

by:griessh
ID: 7376092
Dear josamoto

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "jimwasson"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7419920
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Question to Pivot table 1 67
Please explain "Multi-Tenant Services" 5 108
Beginner to Unreal Engine 4 5 105
Error creating a new C++ project in ,net 20 51
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

733 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