Solved

Adding ATL object in MFC project

Posted on 2000-03-13
2
412 Views
Last Modified: 2013-11-25
Hi,

I am trying to add an ATL object into my MFC project using MS VC++ 6.0.  I went to ClassView->New ATL Object, it gives me the following errors:

ATL Object Wizard:
AddIncludeFile(ProjectNameHeader, MIDLHeader)
You must have ATL setup correctly to insert an ATL object into your project.

What happened before this was that I successfully added an ATL object this way, but then MSDEV crashed.  I reinstalled the whole MS Visual Studio 6.0 and tried again.  And this is when I encounter the above problem.

How can I make this work?

0
Comment
Question by:jujutong
2 Comments
 
LVL 1

Accepted Solution

by:
pcj0961 earned 50 total points
ID: 2623130
you should have gotten a dialog box that asked if you wanted to add
support to your MFC project for ATL. if you answer yes it will insert the needed ATL includes and defines.  without the correct header file additions
ATL won't work. I think that code guru has a sample of the changes under the ATL catagory or If you create a TEST MFC project (SDI) and  then
use the Insert New ATL Object and answer yes to add support you can go
back into the header files and find the additions and use them.
0
 

Author Comment

by:jujutong
ID: 2624992
Hmm, I have already clicked 'Yes' when I was asked 'Do you want to add ATL support to your MFC project?'.  But the errors that I listed still followed.  I am actually trying the suggestion on adding the necessary header files back from a test program.  It's a good getaround but won't fix the cause of the problem.  If you have further ideas, please feel free to shed some light.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
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…

760 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

18 Experts available now in Live!

Get 1:1 Help Now