home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / acdual / server / aclikdoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  3.4 KB  |  105 lines

  1. // AClikDoc.h : interface of the CAutoClickDoc class
  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. class CAutoClickDoc : public CDocument
  15. {
  16. protected: // create from serialization only
  17.     CAutoClickDoc();
  18.     DECLARE_DYNCREATE(CAutoClickDoc)
  19.  
  20. // Attributes
  21. public:
  22.     CPoint m_pt;
  23.  
  24. // Operations
  25. public:
  26.  
  27. // Overrides
  28.     // ClassWizard generated virtual function overrides
  29.     //{{AFX_VIRTUAL(CAutoClickDoc)
  30.     public:
  31.     virtual BOOL OnNewDocument();
  32.     virtual void Serialize(CArchive& ar);
  33.     //}}AFX_VIRTUAL
  34.  
  35. // Implementation
  36. public:
  37.     virtual ~CAutoClickDoc();
  38. #ifdef _DEBUG
  39.     virtual void AssertValid() const;
  40.     virtual void Dump(CDumpContext& dc) const;
  41. #endif
  42.  
  43. protected:
  44.  
  45. // Generated message map functions
  46. protected:
  47.     //{{AFX_MSG(CAutoClickDoc)
  48.     afx_msg void OnEditChangetext();
  49.     //}}AFX_MSG
  50.     DECLARE_MESSAGE_MAP()
  51.  
  52.     // Generated OLE dispatch map functions
  53. public:
  54.     //{{AFX_DISPATCH(CAutoClickDoc)
  55.     CString m_str;
  56.     afx_msg short GetX();
  57.     afx_msg void SetX(short nNewValue);
  58.     afx_msg short GetY();
  59.     afx_msg void SetY(short nNewValue);
  60.     afx_msg LPDISPATCH GetPosition();
  61.     afx_msg void SetPosition(LPDISPATCH newValue);
  62.     afx_msg void Refresh();
  63.     afx_msg void SetAllProps(short x, short y, LPCTSTR text);
  64.     afx_msg void ShowWindow();
  65.     afx_msg void TestErrorHandler(short wCode);
  66.     //}}AFX_DISPATCH
  67.     DECLARE_DISPATCH_MAP()
  68.     DECLARE_INTERFACE_MAP()
  69.  
  70.     // DUAL_SUPPORT_START
  71.     //    add declaration of IDualAClick implementation
  72.     //    You need one entry here for each entry in the
  73.     //    interface statement of the ODL, plus the entries for a
  74.     //    dispatch interface. The BEGIN_DUAL_INTERFACE_PART
  75.     //    macro in mfcdual.h automatically generates the IDispatch
  76.     //    entries for you.
  77.     //    Each entry with the "propput" attribute needs a function
  78.     //    named "put_<property name>". Each entry with the "propget"
  79.     //    attribute needs a function named "get_<property name>".
  80.     //    You can pull these function prototypes from the header file
  81.     //    generated by MKTYPLIB.
  82.     BEGIN_DUAL_INTERFACE_PART(DualAClick, IDualAClick)
  83.         STDMETHOD(put_text)(THIS_ BSTR newText);
  84.         STDMETHOD(get_text)(THIS_ BSTR FAR* retval);
  85.         STDMETHOD(put_x)(THIS_ short newX);
  86.         STDMETHOD(get_x)(THIS_ short FAR* retval);
  87.         STDMETHOD(put_y)(THIS_ short newY);
  88.         STDMETHOD(get_y)(THIS_ short FAR* retval);
  89.         STDMETHOD(put_Position)(THIS_ IDualAutoClickPoint FAR* newPosition);
  90.         STDMETHOD(get_Position)(THIS_ IDualAutoClickPoint FAR* FAR* retval);
  91.         STDMETHOD(putref_Position)(THIS_ IDualAutoClickPoint FAR* newPosition);
  92.         STDMETHOD(RefreshWindow)(THIS);
  93.         STDMETHOD(SetAllProps)(THIS_ short x, short y, BSTR text);
  94.         STDMETHOD(ShowWindow)(THIS);
  95.         STDMETHOD(TestError)(THIS_ short wCode);
  96.     END_DUAL_INTERFACE_PART(DualAClick)
  97.  
  98.     //     add declaration of ISupportErrorInfo implementation
  99.     //     to indicate we support the OLE Automation error object
  100.     DECLARE_DUAL_ERRORINFO()
  101.     // DUAL_SUPPORT_END
  102. };
  103.  
  104. /////////////////////////////////////////////////////////////////////////////
  105.