Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #define CRT_NEWRESOURCE 0x2000
  2.  
  3. #define CRT_ERROR       0x7FFF
  4.  
  5. #define CRT_CURSOR      1
  6.  
  7. #define CRT_BITMAP      2
  8.  
  9. #define CRT_ICON        3
  10.  
  11. #define CRT_MENU        4
  12.  
  13. #define CRT_DIALOG      5
  14.  
  15. #define CRT_STRING      6
  16.  
  17. #define CRT_FONTDIR     7
  18.  
  19. #define CRT_FONT        8
  20.  
  21. #define CRT_ACCELERATOR 9
  22.  
  23. #define CRT_RCDATA      10
  24.  
  25. #define CRT_MESSAGETABLE        11
  26.  
  27. #define CRT_GROUP_CURSOR        12
  28.  
  29. #define CRT_GROUP_ICON  14
  30.  
  31. #define CRT_VERSION     16
  32.  
  33. #define CRT_DLGINCLUDE  17
  34.  
  35. #define CRT_PLUGPLAY    19
  36.  
  37. #define CRT_VXD 20
  38.  
  39. #define CRT_ANICURSOR   21
  40.  
  41. #define CRT_ANIICON     22
  42.  
  43. #define CRT_NEWBITMAP (CRT_BITMAP|CRT_NEWRESOURCE)
  44.  
  45. #define CRT_NEWMENU   (CRT_MENU|CRT_NEWRESOURCE)
  46.  
  47. #define CRT_NEWDIALOG (CRT_DIALOG|CRT_NEWRESOURCE)
  48.  
  49.  
  50.  
  51. #define TOTALTYPERES 22
  52.  
  53. #define NUMMENUPOPUP 8
  54.  
  55.  
  56.  
  57. struct RES{
  58.  
  59.         int type;       //⨯ à¥áãàá¢
  60.  
  61.         char *tname;    //¨¬ï ⨯ 
  62.  
  63.         int id;   //¥£® id
  64.  
  65.         char *name;     //¨¬ï à¥áãàá 
  66.  
  67.         unsigned short lang;    //ï§ëª
  68.  
  69.         unsigned char *res;     //㪠§ â¥«ì ­  â ¡«¨æã à¥áãàá 
  70.  
  71.         unsigned int size;      //à §¬¥à â ¡«¨æë
  72.  
  73. };
  74.  
  75.  
  76.  
  77. #define DRESNUM 100
  78.  
  79. #define SIZERESBUF 2048
  80.  
  81.  
  82.  
  83. struct _STRINGS_{
  84.  
  85.         char *id;
  86.  
  87.         short val;
  88.  
  89. };
  90.  
  91.  
  92.  
  93. _STRINGS_ typemem[7]={
  94.  
  95.         "MOVEABLE",   0x0010,
  96.  
  97.         "FIXED",      ~0x0010,
  98.  
  99.         "PURE",       0x0020,
  100.  
  101.         "IMPURE",     ~0x0020,
  102.  
  103.         "PRELOAD",    0x0040,
  104.  
  105.         "LOADONCALL", ~0x0040,
  106.  
  107.         "DISCARDABLE",0x1000
  108.  
  109. };
  110.  
  111.  
  112.  
  113. _STRINGS_ typeclass[6]={
  114.  
  115.         "BUTTON",   0x80,
  116.  
  117.         "EDIT",     0x81,
  118.  
  119.         "STATIC",   0x82,
  120.  
  121.         "LISTBOX",  0x83,
  122.  
  123.         "SCROLLBAR",0x84,
  124.  
  125.         "COMBOBOX", 0x85
  126.  
  127. };
  128.  
  129.  
  130.  
  131. _STRINGS_ typemenu[NUMMENUPOPUP]={
  132.  
  133.         "GREYED",      0x0001,
  134.  
  135.         "INACTIVE",    0x0002,
  136.  
  137.         "BITMAP",      0x0004,
  138.  
  139.         "OWNERDRAW",   0x0100,
  140.  
  141.         "CHECKED",     0x0008,
  142.  
  143.         "MENUBARBREAK",0x0020,
  144.  
  145.         "MENUBREAK",   0x0040,
  146.  
  147.         "HELP",        0x4000
  148.  
  149. };
  150.  
  151.  
  152.  
  153. _STRINGS_ typeacceler[5]={
  154.  
  155.         "VIRTKEY",  0x01,
  156.  
  157.         "NOINVERT", 0x02,
  158.  
  159.         "SHIFT",    0x04,
  160.  
  161.         "CONTROL",  0x08,
  162.  
  163.         "ALT",      0x10
  164.  
  165. };
  166.  
  167.  
  168.  
  169. enum {v_fv=1,v_pv,v_ffm,v_ff,v_fo,v_ft,v_fs};
  170.  
  171.  
  172.  
  173. _STRINGS_ typeversion[7]={
  174.  
  175.         "FILEVERSION",v_fv,
  176.  
  177.         "PRODUCTVERSION",v_pv,
  178.  
  179.         "FILEFLAGSMASK",v_ffm,
  180.  
  181.         "FILEFLAGS",v_ff,
  182.  
  183.         "FILEOS",v_fo,
  184.  
  185.         "FILETYPE",v_ft,
  186.  
  187.         "FILESUBTYPE",v_fs
  188.  
  189. };
  190.  
  191.  
  192.  
  193. enum{
  194.  
  195. rc_accelerators,rc_auto3state,     rc_autocheckbox,rc_autoradiobutton,rc_bitmap,
  196.  
  197. rc_caption,     rc_characteristics,rc_checkbox,    rc_class,          rc_combobox,
  198.  
  199. rc_control,     rc_ctext,          rc_cursor,      rc_defpushbutton,  rc_dialog,
  200.  
  201. rc_dialogex,    rc_edittext,       rc_exstyle,     rc_font,           rc_groupbox,
  202.  
  203. rc_icon,        rc_listbox,        rc_ltext,       rc_menu,           rc_menuex,
  204.  
  205. rc_menuitem,    rc_messagetable,   rc_popup,       rc_pushbox,        rc_pushbutton,
  206.  
  207. rc_radiobutton, rc_rcdata,         rc_rtext,       rc_scrollbar,      rc_state3,
  208.  
  209. rc_stringtable, rc_style,          rc_version,     rc_versioninfo,    rc_begin,
  210.  
  211. rc_end,         rc_language
  212.  
  213. };
  214.  
  215.  
  216.  
  217. struct{
  218.  
  219.         unsigned short dclass;
  220.  
  221.         unsigned long style;
  222.  
  223. }defdialog[rc_state3+1]={
  224.  
  225.         0,0,
  226.  
  227.         0x80,6,//BS_AUTO3STATE
  228.  
  229.         0X80,3|0x00010000,//BS_AUTOCHECKBOX|WS_TABSTOP,
  230.  
  231.         0X80,9,//BS_AUTORADIOBUTTON,
  232.  
  233.         0,0,
  234.  
  235.         0,0,
  236.  
  237.         0,0,
  238.  
  239.         0X80,0x00010002,//BS_CHECKBOX|WS_TABSTOP,
  240.  
  241.         0,0,
  242.  
  243.         0X85,0x00010000,//0,WS_TABSTOP
  244.  
  245.         0,0x40000000|0x10000000,//WS_CHILD|WS_VISIBLE,
  246.  
  247.         0X82,1,//ES_CENTER,
  248.  
  249.         0,0,
  250.  
  251.         0X80,1|0x00010000,//BS_DEFPUSHBUTTON|WS_TABSTOP,
  252.  
  253.         0,0,
  254.  
  255.         0,0,
  256.  
  257.         0X81,0x00800000|0x00010000,//ES_LEFT|WS_BORDER|WS_TABSTOP,
  258.  
  259.         0,0,
  260.  
  261.         0,0,
  262.  
  263.         0X80,7|0x00010000,//BS_GROUPBOX,
  264.  
  265.         0X82,3,//SS_ICON,
  266.  
  267.         0X83,0x00800000|1,//WS_BORDER|LBS_NOTIFY,
  268.  
  269.         0X82,0x00020000,//ES_LEFT|WS_GROUP,
  270.  
  271.         0,0,
  272.  
  273.         0,0,
  274.  
  275.         0,0,
  276.  
  277.         0,0,
  278.  
  279.         0,0,
  280.  
  281.         0X80,0x00010000,// ??? BS_PUSHBOX,
  282.  
  283.         0X80,0x00010000,//BS_PUSHBUTTON|WS_TABSTOP,
  284.  
  285.         0X80,4,//BS_RADIOBUTTON,
  286.  
  287.         0,0,
  288.  
  289.         0X82,2|0x00020000,//ES_RIGHT|WS_GROUP,
  290.  
  291.         0X84,0,
  292.  
  293.         0X80,5//BS_3STATE
  294.  
  295. };
  296.  
  297.  
  298.  
  299.  
  300.  
  301. union NameOrdinal
  302.  
  303. {
  304.  
  305.         unsigned char *name;
  306.  
  307.         unsigned short ordinal[2];
  308.  
  309. };
  310.  
  311.  
  312.  
  313.  
  314.  
  315. struct _DBH_    //áâàãªâãà  ¤¨ «®£ 
  316.  
  317. {
  318.  
  319.         unsigned long lStyle;
  320.  
  321.         unsigned long lExtendedStyle;
  322.  
  323.         unsigned short NumberOfItems;
  324.  
  325.         unsigned short x;
  326.  
  327.         unsigned short y;
  328.  
  329.         unsigned short cx;
  330.  
  331.         unsigned short cy;
  332.  
  333.         NameOrdinal MenuName;
  334.  
  335.         NameOrdinal ClassName;
  336.  
  337.         char *Caption;
  338.  
  339.         unsigned short FontSize;
  340.  
  341.         char *FontName;
  342.  
  343. };
  344.  
  345.  
  346.  
  347. struct _CD_     //ª®­â஫ì­ë¥ ¤ ­­ë¥ ¤¨ «®£ 
  348.  
  349. {
  350.  
  351.         unsigned long lStyle;
  352.  
  353.         unsigned long lExtendedStyle;
  354.  
  355.         unsigned short x;
  356.  
  357.         unsigned short y;
  358.  
  359.         unsigned short cx;
  360.  
  361.         unsigned short cy;
  362.  
  363.         unsigned short Id;
  364.  
  365.         NameOrdinal ClassId;
  366.  
  367.         NameOrdinal Text;
  368.  
  369.         unsigned short Extra;
  370.  
  371. };
  372.  
  373.  
  374.  
  375. struct _ICOHEAD_
  376.  
  377. {
  378.  
  379.         unsigned short res1;
  380.  
  381.         unsigned short type;
  382.  
  383.         unsigned short count;
  384.  
  385. //      unsigned short res2;
  386.  
  387. };
  388.  
  389.  
  390.  
  391. struct _RESDIR_
  392.  
  393. {
  394.  
  395.         unsigned char width;
  396.  
  397.         unsigned char heigth;
  398.  
  399.         unsigned char color;
  400.  
  401.         unsigned char res1;
  402.  
  403.         unsigned short planes;
  404.  
  405.         unsigned short bitcount;
  406.  
  407.         unsigned long binres;
  408.  
  409.         unsigned short nameord;
  410.  
  411. //      unsigned short res2;
  412.  
  413. };
  414.  
  415.  
  416.  
  417. struct _CURDIR_
  418.  
  419. {
  420.  
  421.         unsigned short width;
  422.  
  423.         unsigned short heigth;
  424.  
  425.         unsigned short planes;
  426.  
  427.         unsigned short bitcount;
  428.  
  429.         unsigned long binres;
  430.  
  431.         unsigned short nameord;
  432.  
  433. //      unsigned short res2;
  434.  
  435. };
  436.  
  437.