Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.4 KiB

  1. //+---------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1997.
  5. //
  6. // File: cstrings.h
  7. //
  8. // Contents: Defines the class CStrings to manage a dynamically
  9. // expandable array of string pairs which may be enumerated
  10. //
  11. // Classes:
  12. //
  13. // Methods:
  14. //
  15. // History: 23-Apr-96 BruceMa Created.
  16. //
  17. //----------------------------------------------------------------------
  18. const DWORD INCREMENT_SIZE = 1024;
  19. class SItem : public CObject
  20. {
  21. public:
  22. SItem(LPCTSTR sItem, LPCTSTR sTitle, LPCTSTR sAppid);
  23. ~SItem();
  24. // data members
  25. CString szItem;
  26. CString szTitle;
  27. CString szAppid;
  28. ULONG fMarked:1;
  29. ULONG fChecked:1;
  30. ULONG fHasAppid:1;
  31. ULONG fDontDisplay:1;
  32. UINT ulClsids;
  33. UINT ulClsidTbl;
  34. TCHAR **ppszClsids;
  35. };
  36. class CStrings
  37. {
  38. public:
  39. CStrings(void);
  40. ~CStrings(void);
  41. SItem *PutItem(TCHAR *szString, TCHAR *szTitle, TCHAR *szAppid);
  42. SItem *FindItem(TCHAR *szItem);
  43. SItem *FindAppid(TCHAR *szAppid);
  44. BOOL AddClsid(SItem *pItem, TCHAR *szClsid);
  45. DWORD InitGetNext(void);
  46. SItem *GetNextItem(void);
  47. SItem *GetItem(DWORD dwItem);
  48. DWORD GetNumItems(void);
  49. BOOL RemoveItem(DWORD dwItem);
  50. BOOL RemoveAll(void);
  51. private:
  52. CObArray arrSItems;
  53. int m_nCount;
  54. };