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