Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I enable Automation in an existing MFC project?

Status
Not open for further replies.

Elemel

Programmer
Joined
Sep 11, 2003
Messages
3
Location
SE
Hello,

I am kind of new to Visual C++ 6 development. I have put some work into a project, and now I find that Automation support would be helpful. (I suppose I did not check that box when creating the project.) Creating a new, Automation-enabled project and then pasting the contents of the old one into it would be a nuisance. So, is there any way to enable Automation in an existing project?

If this is not possible, could anyone give me a hint on how to populate a list box without Automation? I have spent a few hours on the subject without getting anywhere.

Best regards,
Mikael
 
Automation has nothing to do with ListBox. There are very different things.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
>If this is not possible

Anything is possible.

To make things simple however, I suggest you generate an Automation-enabled project and move your stuff into it. It simplifies settings for the dispatch macros the .odl and whatnot.

/Per

if (typos) cout << &quot;My fingers are faster than my brain. Sorry for the typos.&quot;;
 
Hello,

Thank you for the input.

My real problem was that the properties dialog for my list boxes had the data tab disabled. I figured this had something to do with Automation, which probably was not the case. I have now verified that Automation-disabled projects generally have an enabled data tab in list box dialogs. In conclusion, I have no idea why the data tab was disabled in the first place.

I have now created a new, Automation-enabled project and migrated the old code into it. This solved my problem, and did not take as long time as I had anticipated.

Best regards,
Mikael
 
Ok, some confusions:

> properties dialog for my list boxes

What dialog? A list box is a list box. A dialog is a dialog.

>This solved my problem

Congrats.



/Per

if (typos) cout << &quot;My fingers are faster than my brain. Sorry for the typos.&quot;;
 
PerFnurt, I was referring to the dialogs in the resource editor of Visual C++. (Right-click on a list box here and select Properties to get a properties dialog. One of the tabs in this dialog is labeled Data. For some reason, this tab was always disabled in my original project.) Do you follow?
 
I have no idea why that would be disabled but i have a hard time connecting it to an Automation enabled project setting. It is much more likely that the .rc file for that project became corrupted in some way.

Of course this is just wild guessing since i can not reproduce the behavior to analyze the problem.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top