//						RESOURCE.H

#ifndef resourceh
#define resourceh

struct restable
{ unsigned long flags;
  unsigned long timedatestamp;
  unsigned short majver,minver;
  unsigned short numnames,numids;
};

struct leafnode
{ unsigned long datarva;
  unsigned long size;
  unsigned long codepage;
  unsigned long reserved;
};

struct restableentry
{ unsigned long id;
  unsigned long offset;
};

struct versioninfo
{ unsigned short len,value_len,type;
};

struct fixedfileinfo
{ unsigned long signature,strucversion;
  unsigned long fileversionms,fileversionls;
  unsigned long productversionms,productversionls;
  unsigned long fileflagmask,fileflags;
  unsigned long fileos,filetype,filesubtype;
  unsigned long filedatems,filedatels;
};

struct dialogboxheader
{ unsigned long style,extendedstyle;
  unsigned short numberofitems;
  unsigned short x,y;
  unsigned short cx,cy;
};

struct ctrlheader 
{ unsigned long style,extendedstyle;
  unsigned short x,y;
  unsigned short cx,cy;
  unsigned short wid;
};

class res
{ private:
	 unsigned char *rawdata;
	 unsigned long currid;
    unsigned long stringid;

  public:
	 res();
	 ~res();
	 void summary(void);

  private:
    void dirsummary(unsigned char *dta);
    void subdirsummary(unsigned char *dta);
    void leafnodesummary(unsigned char *dta);
    void leaf2summary(unsigned char *dta);
	 void print_edit(unsigned long style);
	 void print_button(unsigned long style);
	 void print_static(unsigned long style);
	 void print_listbox(unsigned long style);
	 void print_scrollbar(unsigned long style);
	 void print_combobox(unsigned long style);
	 unsigned short print_name_or_ord(unsigned char *idata,BOOL do_control,unsigned long style);
};

#endif