home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / com / acdual / server / clikpnt.h < prev    next >
C/C++ Source or Header  |  1998-04-02  |  3KB  |  84 lines

  1. // ClikPnt.h : header file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CAutoClickPoint command target
  17.  
  18. class CAutoClickPoint : public CCmdTarget
  19. {
  20.     DECLARE_DYNCREATE(CAutoClickPoint)
  21.  
  22.     CAutoClickPoint();           // protected constructor used by dynamic creation
  23.  
  24. // Attributes
  25. public:
  26.  
  27. // Operations
  28. public:
  29.     CPoint GetClickPoint() { return CPoint(m_x, m_y); }
  30.     void SetClickPoint(CPoint point) { m_x = (short)point.x; m_y = (short)point.y; }
  31.  
  32. // Overrides
  33.     // ClassWizard generated virtual function overrides
  34.     //{{AFX_VIRTUAL(CAutoClickPoint)
  35.     public:
  36.     virtual void OnFinalRelease();
  37.     //}}AFX_VIRTUAL
  38.  
  39. // Implementation
  40. protected:
  41.     virtual ~CAutoClickPoint();
  42.  
  43.     // Generated message map functions
  44.     //{{AFX_MSG(CAutoClickPoint)
  45.         // NOTE - the ClassWizard will add and remove member functions here.
  46.     //}}AFX_MSG
  47.  
  48. public:
  49.     DECLARE_MESSAGE_MAP()
  50.     // Generated OLE dispatch map functions
  51.     //{{AFX_DISPATCH(CAutoClickPoint)
  52.     short m_x;
  53.     short m_y;
  54.     //}}AFX_DISPATCH
  55.     DECLARE_DISPATCH_MAP()
  56.     DECLARE_INTERFACE_MAP()
  57.  
  58.     // DUAL_SUPPORT_START
  59.     //    add declaration of IDualAutoClickPoint implementation
  60.     //    You need one entry here for each entry in the
  61.     //    interface statement of the ODL, plus the entries for a
  62.     //    dispatch interface. The BEGIN_DUAL_INTERFACE_PART
  63.     //    macro in mfcdual.h automatically generates the IDispatch
  64.     //    entries for you.
  65.     //    Each entry with the "propput" attribute needs a function
  66.     //    named "put_<property name>". Each entry with the "propget"
  67.     //    attribute needs a function named "get_<property name>".
  68.     //    You can pull these function prototypes from the header file
  69.     //    generated by MKTYPLIB.
  70.     BEGIN_DUAL_INTERFACE_PART(DualAutoClickPoint, IDualAutoClickPoint)
  71.         STDMETHOD(put_x)(THIS_ short newX);
  72.         STDMETHOD(get_x)(THIS_ short FAR* retval);
  73.         STDMETHOD(put_y)(THIS_ short newY);
  74.         STDMETHOD(get_y)(THIS_ short FAR* retval);
  75.     END_DUAL_INTERFACE_PART(DualAutoClickPoint)
  76.  
  77.     //     add declaration of ISupportErrorInfo implementation
  78.     //     to indicate we support the OLE Automation error object
  79.     DECLARE_DUAL_ERRORINFO()
  80.     // DUAL_SUPPORT_END
  81. };
  82.  
  83. /////////////////////////////////////////////////////////////////////////////
  84.