home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / WTJ9403.ZIP / WILDASS / SOURCE / GRPFILE.H < prev    next >
C/C++ Source or Header  |  1993-08-13  |  2KB  |  73 lines

  1. typedef struct tagGROUPHEADER
  2. {
  3.    char  cIdnetifier[4];         // must be "PMCC"
  4.    WORD  wCheckSum;              // checksum (ignore)
  5.    WORD  cbGroup;                // size of group file in byte
  6.    WORD  nCmdShow;               // showwindow (ignore)
  7.    RECT  rcNormal;               // ignore
  8.    POINT ptMin;                  // ignore
  9.    WORD  pName;                  // offset from bof to name of group
  10.    WORD  wLogPixelsX;            // ignore
  11.    WORD  wLogPixelsY;            // ignore
  12.    WORD  wBitsPerPixel;          // ignore
  13.    WORD  wPlanes;                // ignore
  14.    WORD  cItems;                 // number of ITEMDATAs
  15.      
  16.    // heres an array of offsets into the real itemdata
  17.    // itemdata that is invalid has an offset of 0
  18.         
  19. }  GROUPHEADER;
  20.  
  21. typedef struct tagITEMDATA
  22. {           
  23.    POINT pt;         // ignore
  24.    WORD  iIcon;      // icon number for this app
  25.    WORD  cbResource; // ignore
  26.    WORD  cb1;        // ignore
  27.    WORD  cb2;        // ignore
  28.    WORD  pHeader;    // ignore
  29.    WORD  pAnd;       // ignore
  30.    WORD  pXOR;       // ignore
  31.    WORD  pName;      // offset to item name
  32.    WORD  pCommand;   // offset to item exe
  33.    WORD  pIconPath;  // offset to item icon resource   
  34.    
  35. }  ITEMDATA;
  36.  
  37. class ProgramMgrItem : public CObject
  38. {  
  39. private:
  40. //   ITEMDATA m_itemData;
  41.    CString  m_strName;
  42.    CString  m_strPath;
  43.    
  44. public:
  45.    ProgramMgrItem( CFile& rSrc, WORD offSet );
  46.    const char * Name() const;      
  47.    const char * Path() const;
  48. }; 
  49.  
  50. class ProgramMgrGroup : public CObList
  51. {   
  52. //   GROUPHEADER m_gh;
  53.    CString     m_strName;
  54.    
  55. public:
  56.    ProgramMgrGroup( const char * pszFileName );
  57.    ~ProgramMgrGroup();
  58.    
  59.    const char * Name() const;
  60.    
  61.    // avoid casts in usage  
  62.    ProgramMgrItem*& GetNext( POSITION& rPos )
  63.    {
  64.       return (ProgramMgrItem*&) CObList::GetNext(rPos);
  65.    }
  66.       
  67.    ProgramMgrItem* GetNext( POSITION& rPos ) const
  68.    {
  69.       return (ProgramMgrItem*) CObList::GetNext(rPos);
  70.    }
  71. };
  72.  
  73.