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

  1. /***********************************************************************
  2. **      T H E M E . H                                                   *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.         THEME.H
  10.  
  11.         Theme record object class definitions for Microsoft Guide
  12. */
  13.  
  14. #ifndef _THEME_H_
  15. #define _THEME_H_
  16.  
  17. /*
  18. Theme objects are constructed from database records of the Theme table.
  19.  
  20. The CThemeRecordset class is used to select and create CTheme objects
  21. from the Theme table via functions in the CDatabaseRecordset parent class.
  22. */
  23. #include "dbsets.h"
  24.  
  25. class COMMMSTVEXPORT CThemeRecordset : public CDatabaseRecordset
  26. {
  27. // This class provides Theme recordset manipulation via parent functions
  28.  
  29. virtual CString GetTableName( VOID);
  30.  
  31. virtual BOOL    SetRecordsetObject( VOID* cRecordsetObject);
  32.  
  33. public:
  34. virtual VOID*   GetRecordsetObject( VOID);
  35. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  36. virtual BOOLEAN Seek(LPCTSTR lpszComparison, LONG lThemeID);
  37. };
  38.  
  39.  
  40. class COMMMSTVEXPORT CTheme : public CObject
  41. {
  42.  
  43.     friend class CThemeRecordset; // generates the CTheme record object
  44.  
  45. private:
  46.     LONG        m_lThemeID;
  47.     LONG        m_lGenreID;
  48.     LONG        m_lSubGenreID;
  49.  
  50. public:
  51.     CTheme(LONG lThemeID = AFX_RFX_LONG_PSEUDO_NULL,
  52.             LONG lGenreID = 0,
  53.             LONG lSubGenreID = 0) :
  54.                 m_lThemeID(lThemeID),
  55.                 m_lGenreID(lGenreID),
  56.                 m_lSubGenreID(lSubGenreID) { }
  57.     ~CTheme(VOID) { }
  58.  
  59.     VOID    SetThemeID( LONG lThemeID) { m_lThemeID = lThemeID; }
  60.     VOID    SetGenreID( LONG lGenreID) { m_lGenreID = lGenreID; }
  61.     VOID    SetSubGenreID( LONG lSubGenreID) { m_lSubGenreID = lSubGenreID; }
  62.  
  63.     LONG    ThemeID() { return m_lThemeID; }
  64.     LONG    GenreID() { return m_lGenreID; }
  65.     LONG    SubGenreID() { return m_lSubGenreID; }
  66. };
  67.  
  68.  
  69. // Table: Theme
  70. #define  TBL_Theme  _T("Theme")
  71.  
  72. //      Field:                         Index            Name     Type    Size
  73. #define FLD_Theme_ThemeID        _T("T Theme ID")    // ThemeID   Long     4
  74. #define FLD_Theme_GenreID        _T("T Genre ID")    // GenreID   Long     4
  75. #define FLD_Theme_SubGenreID    _T("T SubGenre ID")    // GenreID   Long     4
  76.  
  77. #endif
  78.  
  79.