home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / chprop.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  3KB  |  85 lines

  1. /***********************************************************************
  2. **      C P R O P . H                                                   *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.         CPROP.H
  10.  
  11.         ChannelProperty record object class definitions for Microsoft Guide
  12. */
  13.  
  14.  
  15. #ifndef _CPROP_H_
  16. #define _CPROP_H_
  17.  
  18.  
  19. #include "dbsets.h"
  20.  
  21.  
  22. /*
  23.  
  24. ChannelProperty objects are constructed from database records of the ChannelProperty table.
  25.  
  26. The CChannelPropertyRecordset class is used to select and create CChannelProperty objects
  27. from the ChannelProperty table via functions in the CDatabaseRecordset parent class.
  28.  
  29. */
  30.  
  31.  
  32. class  COMMMSTVEXPORT CChannelPropertyRecordset : public CDatabaseRecordset
  33. {
  34. // This class provides ChannelProperty recordset manipulation via parent functions
  35.  
  36. virtual CString GetTableName( VOID);
  37.  
  38. virtual BOOL    SetRecordsetObject( VOID* cRecordsetObject);
  39.  
  40. public:
  41. virtual VOID*   GetRecordsetObject( VOID);
  42. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  43. };
  44.  
  45.  
  46. class COMMMSTVEXPORT CChannelProperty : public CObject
  47. {
  48.     friend class CChannelPropertyRecordset; // generates the CChannelProperty record object
  49.  
  50. private:
  51.  
  52.     LONG            m_lChannelID;
  53.     LONG            m_lBroadcastPropertyID;
  54.  
  55. public:
  56.  
  57.     CChannelProperty(LONG lChannelID = 0,
  58.                         LONG lBroadcastPropertyID = 0) :
  59.                         m_lChannelID(lChannelID),
  60.                         m_lBroadcastPropertyID(lBroadcastPropertyID) { }
  61.  
  62.     ~CChannelProperty(VOID) { }
  63.  
  64.  
  65.     VOID    SetChannelID( LONG lChannelID) { m_lChannelID = lChannelID; }
  66.     VOID    SetBroadcastPropertyID( LONG lBroadcastPropertyID) { m_lBroadcastPropertyID = lBroadcastPropertyID; }
  67.  
  68.     LONG            ChannelID() { return m_lChannelID; }
  69.     LONG            BroadcastPropertyID() { return m_lBroadcastPropertyID; }
  70. };
  71.  
  72.  
  73. // Table: Channel
  74.  
  75. #define  TBL_ChannelProperty  _T("[Channel Property]")
  76.  
  77. //      Field:                                        Name                          Type        Size
  78.  
  79. #define FLD_ChannelProperty_ChannelID                _T("CP Channel ID")              // Long        4
  80. #define FLD_ChannelProperty_BroadcastPropertyID        _T("CP Broadcast Property ID")     // Long        4
  81.  
  82. #endif
  83.  
  84.  
  85.