home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / controls / drawpic / drawpicc.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  78 lines

  1. // DrawPicC.h : Declaration of the CDrawPicCtrl OLE control 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. // CDrawPicCtrl : See DrawPicC.cpp for implementation.
  15.  
  16. class CDrawPicCtrl : public COleControl
  17. {
  18.     DECLARE_DYNCREATE(CDrawPicCtrl)
  19.  
  20. // Constructor
  21. public:
  22.     CDrawPicCtrl();
  23.  
  24. // Overrides
  25.  
  26.     // Drawing function
  27.     virtual void OnDraw(CDC* pdc, const CRect& rcBounds,
  28.         const CRect& rcInvalid);
  29.  
  30.     // Persistence
  31.     virtual void DoPropExchange(CPropExchange* pPX);
  32.  
  33.     // Reset control state
  34.     virtual void OnResetState();
  35.  
  36. // Implementation
  37. protected:
  38.     ~CDrawPicCtrl();
  39.  
  40.     DECLARE_OLECREATE_EX(CDrawPicCtrl)    // Class factory and guid
  41.     DECLARE_OLETYPELIB(CDrawPicCtrl)      // GetTypeInfo
  42.     DECLARE_PROPPAGEIDS(CDrawPicCtrl)     // Property page IDs
  43.     DECLARE_OLECTLTYPE(CDrawPicCtrl)        // Type name and misc status
  44.  
  45.     CImageList          m_ImageList;
  46.     CSize               m_szImageSize;
  47.  
  48. // Message maps
  49.     //{{AFX_MSG(CDrawPicCtrl)
  50.         // NOTE - ClassWizard will add and remove member functions here.
  51.         //    DO NOT EDIT what you see in these blocks of generated code !
  52.     //}}AFX_MSG
  53.     DECLARE_MESSAGE_MAP()
  54.  
  55. // Dispatch maps
  56.     //{{AFX_DISPATCH(CDrawPicCtrl)
  57.     afx_msg BOOL AddPicture(LPPICTUREDISP NewPic);
  58.     afx_msg void ClearImageList();
  59.     //}}AFX_DISPATCH
  60.     DECLARE_DISPATCH_MAP()
  61.  
  62.     afx_msg void AboutBox();
  63.  
  64. // Event maps
  65.     //{{AFX_EVENT(CDrawPicCtrl)
  66.     //}}AFX_EVENT
  67.     DECLARE_EVENT_MAP()
  68.  
  69. // Dispatch and event IDs
  70. public:
  71.     enum {
  72.     //{{AFX_DISP_ID(CDrawPicCtrl)
  73.     dispidAddPicture = 1L,
  74.     dispidClearImageList = 2L,
  75.     //}}AFX_DISP_ID
  76.     };
  77. };
  78.