Re: Using ATL in MFC 7.1

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

From: Headache (rquirk_at_tandbergtv.com)
Date: 11/19/04


Date: 19 Nov 2004 01:31:22 -0800


"Shrishail Rana" <srana@hotpop.com> wrote in message news:<OB$HEGVzEHA.3820@TK2MSFTNGP11.phx.gbl>...
> Hi
>
> I want to use some of the ATL classes in MFC (Dialog/DOC View Application).
> Dev Env is VS 2003.
>
> Do I have to take special steps or just to include the ATL header files and
> start using the classes. Since ATL has lot of dependencies on CComModule. Do
> I have to declare a variable of that class.

You use the headers of the classes you wish to use! Normally you will
use CComPtr, CComQIPtr etc. A popular header is, therefore, AtlBase.h.

I don't know why you would want to use CComModule in a MFC
application. CComModule is the ATL equivalent of CWinApp. It doesn't
strike me as a particularly bright idea to have essentially two
application objects in the context of one process ...



Relevant Pages

  • RE: Intellisense showing ATL instead of MFC
    ... I understood you notice some VS IDE Intelligence always show the ATL ... It sounds you are using ATL/MFC Shared Classes ... ATL and MFC application. ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.ide)
  • Re: COM dll resources
    ... resources named via strings - it requires numeric IDs. ... to both frameworks - ATL and MFC - and stored separately. ... This time I derived it from the MFC class CDialog ... >> Then add resource string to this DLL and have a method which loads this ...
    (microsoft.public.vc.atl)
  • Re: Queryinterface then Release fails
    ... parent or factory object) will release your interface. ... and finally you release main IDirectDraw ... I would suggest you to really use ATL in your context. ... (Note that you can also use these ATL helper classes also in MFC.) ...
    (microsoft.public.vc.mfc)
  • Re: ATL Server Class Method Implementation question
    ... Typically your application class is a singleton of some sort. ... In MFC that is a class derived from CWinApp. ... > need to inherit something off of these ATL classes, ... >> Microsoft MVP, MCSD ...
    (microsoft.public.win32.programmer.ole)
  • Re: How to handle event of ATL COM Dll in MFC Client like in VB6 ?
    ... That's ATL, not MFC. ... Microsoft MVP, MCSD ... >> I would like now to make and MFC project and use my ATL ...
    (microsoft.public.vc.atl)