home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / shell / fileview / cstrtabl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-12  |  1.3 KB  |  51 lines

  1. //THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 
  2. //ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  3. //THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright  1994-1996  Microsoft Corporation.  All Rights Reserved.
  7. //
  8. //    PROGRAM:CSTRTABL.H    
  9. //
  10. //    PURPOSE: Class and structure definitions for the CStringTable class
  11. //   that helps to manage and retrieve strings from stringtables. 
  12. //
  13. //    PLATFORMS:    Windows 95
  14. //
  15. //    SPECIAL INSTRUCTIONS: N/A
  16. //
  17. #ifndef _CSTRTABL_H_
  18. #define _CSTRTABL_H_
  19.  
  20.  
  21. /*
  22.  * CStringTable providing string table management.  Provides
  23.  * simple [] array lookup using a stringtable ID to obtain
  24.  * string pointers.
  25.  */
  26.  
  27. class CStringTable
  28.     {
  29.     protected:
  30.         HINSTANCE       m_hInst;
  31.         UINT            m_idsMin;
  32.         UINT            m_idsMax;
  33.         USHORT          m_cStrings;
  34.         LPSTR           m_pszStrings;
  35.         LPSTR          *m_ppszTable;
  36.  
  37.     public:
  38.         CStringTable(HINSTANCE);
  39.         ~CStringTable(void);
  40.  
  41.         BOOL FInit(UINT, UINT, UINT);
  42.  
  43.         //Function to resolve an ID into a string pointer.
  44.         const LPSTR operator [](const UINT) const;
  45.     };
  46.  
  47. typedef CStringTable * PCStringTable;
  48.  
  49.  
  50. #endif //_CSTRTABL_H_
  51.