DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: ... Oops an error ... Just some change ...

  1. #1
    Guest

    ... Oops an error ... Just some change ...

    Hi Ralph and others,

    I have found the solution, 'virtual fonction' ... Pffff, i was afraid with
    that 'ATL Class' created by the ATL Wizard. (my first one).
    No need of Pointer of member function (no headeache !) So here it is:

    ________________________________________________________________________

    class CclassB :
    {

    public:
    // Wil be executed by an event in Process 2 (Exe application)
    virtual void Fire_mouse (double, double);
    }
    ________________________________________________________________________

    class ATL_NO_VTABLE CclassA :
    public CComObjectRootEx<CComSingleThreadModel>,
    public CComCoClass<CclassA, &CLSID_classA>,
    public IConnectionPointContainerImpl<CclassA>,
    public IDispatchImpl<IclassA, &IID_IclassA,
    &LIBID_EDSPYACCLib>,
    public CProxy_IclassAEvents< CclassA >,
    public CclassB // <==== I have added my class to the mutiple
    heritance existing yet

    {
    public:
    CclassA()
    {
    }

    // will fire an event in Process1, (visual basic form, single Exe)
    virtual void Fire_mouse (double, double);
    }
    _________________________________________________________________________

    ===> When an event is catched in CclassB, the Fire_mouse fonction of ATL
    CclassA is executed.
    What ever this fonction is doing in CclassB, it execute everything of the
    ATL CclassA 'Fire_mouse' Function.
    Now i'm sure it works also with ATL class ...

    .... always trying to reinvente the wheel ! ... So difficult to make it easy
    .... :-)

    Thank's Ralph.






  2. #2
    ralph Guest

    Re: ... Oops an error ... Just some change ...


    <ndriss@club-internet.fr> wrote:
    >Hi Ralph and others,
    >
    >I have found the solution, 'virtual fonction' ... Pffff, i was afraid with
    >that 'ATL Class' created by the ATL Wizard. (my first one).
    >No need of Pointer of member function (no headeache !) So here it is:
    >
    >________________________________________________________________________
    >
    >class CclassB :
    >{
    >
    > public:
    > // Wil be executed by an event in Process 2 (Exe application)
    > virtual void Fire_mouse (double, double);
    >}
    >________________________________________________________________________
    >
    >class ATL_NO_VTABLE CclassA :
    > public CComObjectRootEx<CComSingleThreadModel>,
    > public CComCoClass<CclassA, &CLSID_classA>,
    > public IConnectionPointContainerImpl<CclassA>,
    > public IDispatchImpl<IclassA, &IID_IclassA,
    >&LIBID_EDSPYACCLib>,
    > public CProxy_IclassAEvents< CclassA >,
    > public CclassB // <==== I have added my class to the mutiple
    >heritance existing yet
    >
    >{
    >public:
    > CclassA()
    > {
    > }
    >
    > // will fire an event in Process1, (visual basic form, single Exe)
    > virtual void Fire_mouse (double, double);
    >}
    >_________________________________________________________________________
    >
    >===> When an event is catched in CclassB, the Fire_mouse fonction of ATL
    >CclassA is executed.
    >What ever this fonction is doing in CclassB, it execute everything of the
    >ATL CclassA 'Fire_mouse' Function.
    >Now i'm sure it works also with ATL class ...
    >
    >.... always trying to reinvente the wheel ! ... So difficult to make it

    easy
    >.... :-)
    >
    >Thank's Ralph.
    >


    LOL.
    Hey, I knew that. I just wanted to see if you could figured it out. <g>

    But seriously, you at least were looking for a local solution (chewing on
    the same carriage). I was the one out designing an expensive intermediary(building
    another wagon).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center