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

  1. /***********************************************************************
  2. **      B R P R O P . H                                                *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.  
  10.         BRPROP.H
  11.  
  12.         BroadcastProperty record object class definitions for Microsoft Guide
  13.  
  14.  
  15.  
  16. */
  17.  
  18.  
  19.  
  20. #ifndef _BRPROP_H_
  21. #define _BRPROP_H_
  22.  
  23.  
  24. #include "dbsets.h"
  25.  
  26.  
  27. /*
  28.  
  29. BroadcastProperty objects are constructed from database records of the BroadcastProperty table.
  30.  
  31. The CBroadcastPropertyRecordset class is used to select and create CBroadcastProperty objects
  32. from the BroadcastProperty table via functions in the CDatabaseRecordset parent class.
  33.  
  34. */
  35.  
  36.  
  37.  
  38. class  COMMMSTVEXPORT CBroadcastPropertyRecordset : public CDatabaseRecordset
  39. {
  40.  
  41. // This class provides BroadcastProperty recordset manipulation via parent functions
  42.  
  43.  
  44. virtual CString GetTableName( VOID);
  45.  
  46.  
  47. virtual BOOL    SetRecordsetObject( VOID* cRecordsetObject);
  48.  
  49. public:
  50. virtual VOID*   GetRecordsetObject( VOID);
  51. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  52. virtual BOOLEAN Seek(LPCTSTR lpszComparison, LONG lBroadcastPropertyID);
  53. };
  54.  
  55.  
  56.  
  57.  
  58. class COMMMSTVEXPORT CBroadcastProperty : public CObject
  59. {
  60.  
  61.     friend class CBroadcastPropertyRecordset; // generates the CBroadcastProperty record object
  62.  
  63. private:
  64.  
  65.     LONG            m_lBroadcastPropertyID;
  66.     LONG            m_lTuningSpace;
  67.     CString         m_cszAbbreviation;
  68.     CString         m_cszName;
  69.     LONG            m_lDisplayOrder;
  70.     CString         m_cszPictogramMoniker;
  71.  
  72. public:
  73.  
  74.     CBroadcastProperty(LONG lBroadcastPropertyID = AFX_RFX_LONG_PSEUDO_NULL,
  75.                         LONG lTuningSpace = 0,
  76.                         CString cszAbbreviation = "",
  77.                         CString cszName = "",
  78.                         LONG lDisplayOrder = 0,
  79.                         CString cszPictogramMoniker = "") :
  80.                         m_lBroadcastPropertyID(lBroadcastPropertyID),
  81.                         m_lTuningSpace(lTuningSpace),
  82.                         m_cszAbbreviation(cszAbbreviation), 
  83.                         m_cszName(cszName),
  84.                         m_lDisplayOrder(lDisplayOrder),
  85.                         m_cszPictogramMoniker(cszPictogramMoniker) { }
  86.  
  87.     ~CBroadcastProperty(VOID) { }
  88.  
  89.  
  90.     VOID    SetTuningSpace( LONG lTuningSpace) { m_lTuningSpace = lTuningSpace; }
  91.     VOID    SetAbbreviation( LPCTSTR cszAbbreviation) { m_cszAbbreviation = cszAbbreviation; }
  92.     VOID    SetName( LPCTSTR cszName) { m_cszName = cszName; }
  93.     VOID    SetDisplayOrder( LONG lDisplayOrder) { m_lDisplayOrder = lDisplayOrder; }
  94.     VOID    SetPictogramMoniker( LPCTSTR cszPictogramMoniker) { m_cszPictogramMoniker = cszPictogramMoniker; }
  95.  
  96.     LONG            BroadcastPropertyID() { return m_lBroadcastPropertyID; }
  97.     LONG            TuningSpace() { return m_lTuningSpace; }
  98.     CString         Abbreviation() { return m_cszAbbreviation; }
  99.     CString         Name() { return m_cszName; }
  100.     LONG            DisplayOrder() { return m_lDisplayOrder; }
  101.     CString         PictogramMoniker() { return m_cszPictogramMoniker; }
  102. };
  103.  
  104.  
  105. // Table: BroadcastProperty
  106.  
  107. #define  TBL_BroadcastProperty  _T("[Broadcast Property]")
  108.  
  109. //      Field:                                        Name                          Type    Size
  110.  
  111. #define FLD_BroadcastProperty_BroadcastPropertyID _T("BP Broadcast Property ID") // AutoLong  4
  112. #define FLD_BroadcastProperty_TuningSpace         _T("BP Tuning Space")          // Long      4
  113. #define FLD_BroadcastProperty_Abbreviation        _T("BP Abbreviation")          // Text      4
  114. #define FLD_BroadcastProperty_Name                _T("BP Name")                  // Text    128
  115. #define FLD_BroadcastProperty_DisplayOrder        _T("BP Display Order")         // Long      4
  116. #define FLD_BroadcastProperty_PictogramMoniker    _T("BP Pictogram Moniker")     // Text    255
  117.  
  118. #endif
  119.  
  120.