home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************/
- /* */
- /* TurboCAD for Windows */
- /* Copyright (c) 1993 - 2001 */
- /* International Microcomputer Software, Inc. */
- /* (IMSI) */
- /* All rights reserved. */
- /* */
- /******************************************************************/
-
- // SDKDemoCtl.h : Declaration of the CSDKDemoCtrl OLE control class.
-
- /////////////////////////////////////////////////////////////////////////////
- // CSDKDemoCtrl : See SDKDemoCtl.cpp for implementation.
-
- class CSDKDemoCtrl : public COleControl
- {
- DECLARE_DYNCREATE(CSDKDemoCtrl)
-
- // Constructor
- public:
- CSDKDemoCtrl();
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CSDKDemoCtrl)
- public:
- virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
- virtual void DoPropExchange(CPropExchange* pPX);
- virtual void OnResetState();
- protected:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- //}}AFX_VIRTUAL
-
- // Implementation
- protected:
- CString m_strAllLayers;
- BOOL m_bFirstDraw;
- IApplication* m_pIApp;
- IDrawing* m_pIDrawing;
- View* m_pView;
- CPoint m_ptMouseDown;
- double m_dragX;
- double m_dragY;
- VARIANT m_dragOutline;
- IGraphic* m_pDragGraphic;
- BOOL m_bDragging;
-
- ~CSDKDemoCtrl();
- BOOL OpenDrawing(const CString& strFileName);
- void CloseDrawing();
- BOOL BeginDrag(const CPoint& point);
- void Drag(const CPoint& point);
- void EndDrag(const CPoint& point);
-
- DECLARE_OLECREATE_EX(CSDKDemoCtrl) // Class factory and guid
- DECLARE_OLETYPELIB(CSDKDemoCtrl) // GetTypeInfo
- DECLARE_PROPPAGEIDS(CSDKDemoCtrl) // Property page IDs
- DECLARE_OLECTLTYPE(CSDKDemoCtrl) // Type name and misc status
-
- // Message maps
- //{{AFX_MSG(CSDKDemoCtrl)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- // Dispatch maps
- //{{AFX_DISPATCH(CSDKDemoCtrl)
- CString m_strFileName;
- afx_msg void OnFileNameChanged();
- CString m_strHideLayers;
- afx_msg void OnHideLayersChanged();
- afx_msg BSTR GetAllLayers();
- //}}AFX_DISPATCH
- DECLARE_DISPATCH_MAP()
-
- afx_msg void AboutBox();
-
- // Event maps
- //{{AFX_EVENT(CSDKDemoCtrl)
- //}}AFX_EVENT
- DECLARE_EVENT_MAP()
-
- // Dispatch and event IDs
- public:
- enum {
- //{{AFX_DISP_ID(CSDKDemoCtrl)
- dispidFileName = 1L,
- dispidHideLayers = 2L,
- dispidAllLayers = 3L,
- //}}AFX_DISP_ID
- };
- };
-