Re: ATL Wizard question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance





"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
.



Relevant Pages

  • Re: Check a radio button
    ... controls, he would have gotten a pointer to my essay on control member variables. ... You and I can program without the wizards because we know the paradigms and can actually ... to the "real programmers" mythos. ... I can understand how some would not want to use MFC (although the ...
    (microsoft.public.vc.mfc)
  • Re: Wizard: Multiple forms or hiden controls?
    ... Here is a link to one of my stripped down wizards. ... The wizbtns form is used like a control on the main carrier form. ...
    (microsoft.public.access.formscoding)
  • Re: A nation without Wizards
    ... society that bans Wizards - Wizards are pretty much ... the only spellcasting group a government *could* have ... can't control as well. ...
    (rec.games.frp.dnd)
  • Re: Safe ID Range for my COMMAND_RANGE message map entry
    ... Edward Mitchell wrote: ... menus. ... My question is if there is a range of numbers in the 16 bit ID set which is completely under my control. ... Someplace where I am guaranteed that one of the wizards won't allocate numbers between my beginning and end? ...
    (microsoft.public.vc.mfc)
  • Re: Include IE in DLL ...
    ... but I can't create a new instance of IE that shares the sessions ... "Igor Tandetnik" wrote in message ... >> session states across multiple windows I need to include IE in a DLL. ... > Just create a hidden window that hosts WebBrowser ActiveX control, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)