home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / theme.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.5 KB  |  81 lines

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