Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2005

Tip: Looking for answers? Try searching our database.

ATL Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredrik Wahlgren - 14 Jan 2005 19:45 GMT
Hi

I have used ATL a couple of times to make excel autoamtion add-ins. So far,
I have only made functions that take simple arguments like strings or
integers. I now want to do so something a little more complicted. What I
have in mind requires that one of the parameters is an Excel Range object.
But I don't know how to do this. My guess is that I use something like an
IDispatch pointer and then edit the files manually. When I enter the
function in a cell, I want Excel ro recognize that the parameter should be a
Range

Anty help is appreciated.

/Fredrik
Arnaud Debaene - 15 Jan 2005 10:07 GMT
> Hi
>
[quoted text clipped - 3 lines]
> complicted. What I have in mind requires that one of the parameters
> is an Excel Range object. But I don't know how to do this.
use #import on the Excel tlb to generate a wrapper class around all Excel
types, including Range.

Arnaud
MVP - VC
Fredrik Wahlgren - 15 Jan 2005 19:26 GMT
> > Hi
> >
[quoted text clipped - 8 lines]
> Arnaud
> MVP - VC

How do Igenerate wrapper classes? Is there a site which explains how to
proceed? I assume this means I have to use MFC, right?

/Fredrik

/
Arnaud Debaene - 18 Jan 2005 19:50 GMT
>>> Hi
>>>
[quoted text clipped - 11 lines]
> How do Igenerate wrapper classes? Is there a site which explains how
> to proceed?

As i said, use the #import directive. The doc is here :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_pr
edir_The_.23.import_Directive.asp?frame=true


>I assume this means I have to use MFC, right?
You assume wrongly...

Arnaud
MVP - VC
Fredrik Wahlgren - 18 Jan 2005 20:08 GMT
> >>> Hi
> >>>
[quoted text clipped - 13 lines]
>
> As i said, use the #import directive. The doc is here :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_pr
edir_The_.23.import_Directive.asp?frame=true


> >I assume this means I have to use MFC, right?
> You assume wrongly...
>
> Arnaud
> MVP - VC

I think I know how to do this know. I managed to implement an interface
written in C#. And sure enough, there was my Range parameter. I suppose that
if I wanted to create a function "Manually", using the wixzard, I would
select an IDsipatch pointer and then manually change it to Excel::Range. I
think that in VC6, you had to deal with the idl file as well.

/Fredrik

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.