Re: ATL Wizard question
- From: "Tim Hill" <TimHill@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 01:32:04 -0700
"Igor Tandetnik" wrote:
> "Tim Hill" <Tim Hill@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:1CAB58A0-9076-4A61-BFFB-796110EAF10E@xxxxxxxxxxxxx
> > I am attempting to build an ActiveX control using ATL Wizards. I am
> > not familiar with this environment and have a question.
> >
> > I can build and run a control using the wizards. However when I try
> > to add or change a property's DISPID in the .idl file I get an error.
>
> What exactly are you trying to change? What error do you get?
>
> > Where are the DISPIDs defined in the project and how can I modify
> > them?
>
> Nowhere. As you have probably guessed, they are just hardcoded integer
> costants in the IDL file, assigned sequentially. There should not be a
> problem modifying them by hand. But if your control has a property map
> (see BEGIN_PROP_MAP, PROP_ENTRY et al), make sure the DISPIDs are
> synchronized between the map and the IDL.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>
> Thanks Igor,
The error message I get is "MIDL2035 : constant expression expected". I was
trying to change the DISPID names and add new ones. I could not find the
DISPIDS defined anywhere in the example projects so assumed the MIDL compiler
defined them automatically when it generated the header file. I currently get
around the problem by using fixed integers, which is what the classview
wizard does when it adds a new property. Still it would be nice to know what
was going wrong.
Tim
.
- Follow-Ups:
- Re: ATL Wizard question
- From: Igor Tandetnik
- Re: ATL Wizard question
- References:
- ATL Wizard question
- From: Tim Hill
- Re: ATL Wizard question
- From: Igor Tandetnik
- ATL Wizard question
- Prev by Date: Re: A question from the ignorant and uninitiated...
- Next by Date: DLL as automation client
- Previous by thread: Re: ATL Wizard question
- Next by thread: Re: ATL Wizard question
- Index(es):
Relevant Pages
|