home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / newprj / newprj.c next >
C/C++ Source or Header  |  1990-03-14  |  19KB  |  408 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4.  
  5. char filename[256];
  6. char projname[256];
  7. char *tmpptr;
  8. FILE *outfile;
  9. char tempicon[] =
  10. {
  11.     73,67,26,0,0,0,16,0,16,0,32,0,0,0,12,0,0,0,32,0,64,0,1,0,1,0,0,0,0,-1,
  12.     -1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  13.     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  14.     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  15.     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,
  16.     -1,-1,-1,-39,-51,-33,-1,-42,-75,-33,-1,-41,-75,-97,-1,-41,-75,95,-1,-42,
  17.     -76,-33,-1,-39,-51,-33,-1,-33,-1,-1,-1,-33,-1,-1,-1,-33,-1,-1,-1,-1,-1,
  18.     -1,-1,-1,-2,-1,-1,-1,-2,-1,-1,97,-70,-1,-1,111,-86,63,-1,99,-86,-33,-1,
  19.     111,-86,-33,-1,97,-110,63,-1,127,-1,-1,-1,127,-1,-1,-1,127,-1,-1,-1,127,
  20.     -1,-1,-1,127,-1,-1,-8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
  21.     -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
  22. };
  23.  
  24. void cdecl main(int argc,char **argv)
  25.  
  26. {
  27.  
  28.     printf("\nnewprj - OS/2 PM project creator.");
  29.      printf("\n    Written by Anthony Andersen. Compuserve 72037,2474");
  30.      printf("\n    Released to Public Domain. Comments are welcome.\n\n");
  31.  
  32. /***************************************************************/
  33.     if (argc == 1 || argv[1][0] == '-' || argv[1][0] == '?')
  34.     {
  35.         printf("    usage:");
  36.         printf("\n           newprj projectname");
  37.         printf("\n");
  38.         printf("\n    arguments are as follows:");
  39.          printf("\n           projectname : name for new project (no extension)");
  40.         printf("\n");
  41.         printf("\n    example:");
  42.         printf("\n           newprj myproj");
  43.         printf("\n");
  44.         return;
  45.     }
  46. /***************************************************************/
  47.  
  48.     strcpy(filename,argv[1]);
  49.     if (!(tmpptr = strstr(filename,"."))) {
  50.         tmpptr = &filename[strlen(filename)];
  51.     }
  52.     *tmpptr = '\0';
  53.     strcpy(projname,filename);
  54.  
  55.     strcat(filename,".ICO");
  56.     outfile = fopen(filename,"wb");
  57.     if (outfile == NULL) {
  58.         printf("Can't create file %s\n",filename);
  59.         return;
  60.     }
  61.     fwrite(tempicon,1,288,outfile);
  62.     fclose(outfile);
  63.     printf("Wrote file %s\n",filename);
  64.  
  65.     *tmpptr = '\0';
  66.     strcat(filename,".MAK");
  67.  
  68.     /* create MAKefile */
  69.  
  70.     outfile = fopen(filename,"wt");
  71.     if (outfile == NULL) {
  72.         printf("Can't create file %s",filename);
  73.         return;
  74.     }
  75.     fprintf(outfile,"#makefile for %s\n\n",projname);
  76.     fprintf(outfile,"cp=cl /c /W3 /G2swc /Od /ALw /Zi\n\n",projname);
  77.     fprintf(outfile,"%s.res: %s.rc %s.h %s.dlg\n",projname,projname,projname,projname);
  78.     fprintf(outfile,"    rc -r %s.rc\n\n",projname);
  79.     fprintf(outfile,"%s.obj: %s.c %s.h\n",projname,projname,projname);
  80.     fprintf(outfile,"    $(cp) %s.c\n\n",projname);
  81.     fprintf(outfile,"%s.exe: %s.obj %s.def\n",projname,projname,projname);
  82.     fprintf(outfile,"    link @%s.lnk\n",projname);
  83.     fprintf(outfile,"    rc %s.res\n\n",projname);
  84.     fprintf(outfile,"%s.exe: %s.res\n",projname,projname);
  85.     fprintf(outfile,"    rc %s.res\n\n",projname);
  86.     fclose(outfile);
  87.     printf("Wrote file %s\n",filename);
  88.  
  89.     *tmpptr = '\0';
  90.     strcat(filename,".C");
  91.  
  92.     /* create C file */
  93.  
  94.     outfile = fopen(filename,"wt");
  95.     if (outfile == NULL) {
  96.         printf("Can't create file %s",filename);
  97.         return;
  98.     }
  99.     fprintf(outfile,"/**********************************************************************/\n");
  100.     fprintf(outfile,"/*                                                                    */\n");
  101.     fprintf(outfile,"/* PROGRAM: %s.c                                                      */\n",projname);
  102.     fprintf(outfile,"/*                                                                    */\n");
  103.     fprintf(outfile,"/* DESCRIPTION:                                                       */\n");
  104.     fprintf(outfile,"/*                                                                    */\n");
  105.     fprintf(outfile,"/* ON ENTRY:                                                          */\n");
  106.     fprintf(outfile,"/*                                                                    */\n");
  107.     fprintf(outfile,"/* ON EXIT:                                                           */\n");
  108.     fprintf(outfile,"/*                                                                    */\n");
  109.     fprintf(outfile,"/**********************************************************************/\n");
  110.     fprintf(outfile,"\n");
  111.     fprintf(outfile,"#define INCL_WIN\n");
  112.     fprintf(outfile,"#define INCL_GPI\n");
  113.     fprintf(outfile,"#define INCL_DOS\n");
  114.     fprintf(outfile,"\n");
  115.     fprintf(outfile,"#include \"os2.h\"\n");
  116.     fprintf(outfile,"#include \"%s.h\"\n",projname);
  117.     fprintf(outfile,"\n");
  118.     fprintf(outfile,"HAB    hab;\n");
  119.     fprintf(outfile,"HMQ    hmq;\n");
  120.     fprintf(outfile,"QMSG   qmsg;\n");
  121.     fprintf(outfile,"HWND   %sframe;\n",projname);
  122.     fprintf(outfile,"HWND   %sclient;\n",projname);
  123.     fprintf(outfile,"ULONG  frameflags = FCF_STANDARD|FCF_SHELLPOSITION;\n");
  124.     fprintf(outfile,"\n");
  125.     fprintf(outfile,"\n");
  126.     fprintf(outfile,"/**********************************************************************/\n");
  127.     fprintf(outfile,"/*                                                                    */\n");
  128.     fprintf(outfile,"/* ROUTINE: VOID cdecl main(int argc,char **argv)                     */\n");
  129.     fprintf(outfile,"/*                                                                    */\n");
  130.     fprintf(outfile,"/* DESCRIPTION:                                                       */\n");
  131.     fprintf(outfile,"/*                                                                    */\n");
  132.     fprintf(outfile,"/* ON ENTRY:                                                          */\n");
  133.     fprintf(outfile,"/*                                                                    */\n");
  134.     fprintf(outfile,"/* ON EXIT:                                                           */\n");
  135.     fprintf(outfile,"/*                                                                    */\n");
  136.     fprintf(outfile,"/**********************************************************************/\n");
  137.     fprintf(outfile,"\n");
  138.     fprintf(outfile,"VOID cdecl main(int argc,char **argv)\n");
  139.     fprintf(outfile,"\n");
  140.     fprintf(outfile,"{\n");
  141.     fprintf(outfile,"    hab = WinInitialize(0);\n");
  142.     fprintf(outfile,"    hmq = WinCreateMsgQueue(hab, 0);\n");
  143.     fprintf(outfile,"\n");
  144.     fprintf(outfile,"    WinRegisterClass(\n");
  145.     fprintf(outfile,"        hab,               /* Anchor block handle             */\n");
  146.     fprintf(outfile,"        \"%sclass\",         /* Name of class being registered  */\n",projname);
  147.     fprintf(outfile,"        %swindproc,        /* Window procedure for class      */\n",projname);
  148.     fprintf(outfile,"        CS_SIZEREDRAW,     /* Class style                     */\n");
  149.     fprintf(outfile,"        0);                /* Extra bytes to reserve          */\n");
  150.     fprintf(outfile,"\n");
  151.     fprintf(outfile,"    %sframe = WinCreateStdWindow(\n",projname);
  152.     fprintf(outfile,"        HWND_DESKTOP,      /* parent                          */\n");
  153.     fprintf(outfile,"        WS_VISIBLE|FS_SHELLPOSITION, /* style of frame        */\n");
  154.     fprintf(outfile,"        &frameflags,       /* Pointer to control data         */\n");
  155.     fprintf(outfile,"        \"%sclass\",         /* Client window class name        */\n",projname);
  156.     fprintf(outfile,"        NULL,              /* titlebar text is %s.exe         */\n",projname);
  157.     fprintf(outfile,"        0L,                /* Style of client window          */\n");
  158.     fprintf(outfile,"        NULL,              /* Module handle for resources     */\n");
  159.     fprintf(outfile,"        FRAMERESID,        /* resource id                     */\n");
  160.     fprintf(outfile,"        &%sclient);        /* Pointer to client window handle */\n",projname);
  161.     fprintf(outfile,"\n");
  162.     fprintf(outfile,"\n");
  163.     fprintf(outfile,"    WinSetWindowPos(%sframe,HWND_TOP,0,0,0,0,\n",projname);
  164.     fprintf(outfile,"                    SWP_ACTIVATE|SWP_SHOW|SWP_ZORDER);\n");
  165.     fprintf(outfile,"\n");
  166.     fprintf(outfile,"    while (WinGetMsg(hab,&qmsg,NULL,0,0)) {\n");
  167.     fprintf(outfile,"        WinDispatchMsg(hab,&qmsg);\n");
  168.     fprintf(outfile,"    }\n");
  169.     fprintf(outfile,"\n");
  170.     fprintf(outfile,"    WinDestroyWindow(%sframe);\n",projname);
  171.     fprintf(outfile,"    WinDestroyMsgQueue(hmq);\n");
  172.     fprintf(outfile,"    WinTerminate(hab);\n");
  173.     fprintf(outfile,"}\n");
  174.     fprintf(outfile,"\n");
  175.     fprintf(outfile,"\n");
  176.     fprintf(outfile,"/**********************************************************************/\n");
  177.     fprintf(outfile,"/*                                                                    */\n");
  178.     fprintf(outfile,"/* ROUTINE: MRESULT CALLBACK %swindproc(hwnd,msg,mp1,mp2)             */\n",projname);
  179.     fprintf(outfile,"/*                                                                    */\n");
  180.     fprintf(outfile,"/* DESCRIPTION:                                                       */\n");
  181.     fprintf(outfile,"/*                                                                    */\n");
  182.     fprintf(outfile,"/* ON ENTRY:                                                          */\n");
  183.     fprintf(outfile,"/*                                                                    */\n");
  184.     fprintf(outfile,"/* ON EXIT:                                                           */\n");
  185.     fprintf(outfile,"/*                                                                    */\n");
  186.     fprintf(outfile,"/**********************************************************************/\n");
  187.     fprintf(outfile,"\n");
  188.     fprintf(outfile,"MRESULT CALLBACK %swindproc(HWND hwnd,USHORT msg,MPARAM mp1,MPARAM mp2)\n",projname);
  189.     fprintf(outfile,"\n");
  190.     fprintf(outfile,"{\n");
  191.     fprintf(outfile,"\n");
  192.     fprintf(outfile,"    RECTL  rectl;\n");
  193.     fprintf(outfile,"    HPS    hps;\n");
  194.     fprintf(outfile,"    USHORT cmd;\n");
  195.     fprintf(outfile,"\n");
  196.     fprintf(outfile,"    switch (msg) {\n");
  197.     fprintf(outfile,"\n");
  198.     fprintf(outfile,"    case WM_CREATE:\n");
  199.     fprintf(outfile,"        break;\n");
  200.     fprintf(outfile,"\n");
  201.     fprintf(outfile,"    case WM_PAINT:\n");
  202.     fprintf(outfile,"        hps = WinBeginPaint(hwnd,NULL,&rectl);\n");
  203.     fprintf(outfile,"        GpiErase(hps);\n");
  204.     fprintf(outfile,"        WinEndPaint(hps);\n");
  205.     fprintf(outfile,"        return (0L);\n");
  206.     fprintf(outfile,"        break;\n");
  207.     fprintf(outfile,"\n");
  208.     fprintf(outfile,"    case WM_COMMAND:\n");
  209.     fprintf(outfile,"\n");
  210.     fprintf(outfile,"        cmd = SHORT1FROMMP(mp1);\n");
  211.     fprintf(outfile,"\n");
  212.     fprintf(outfile,"        switch (cmd) {\n");
  213.     fprintf(outfile,"\n");
  214.     fprintf(outfile,"        case IDM_EXIT:\n");
  215.     fprintf(outfile,"            WinPostMsg(hwnd,WM_CLOSE,0L,0L);\n");
  216.     fprintf(outfile,"            break;\n");
  217.     fprintf(outfile,"\n");
  218.     fprintf(outfile,"        case IDM_ABOUT:\n");
  219.     fprintf(outfile,"            WinDlgBox(hwnd,hwnd,aboutdlgproc,NULL,IDD_ABOUT,NULL);\n");
  220.     fprintf(outfile,"            break;\n");
  221.     fprintf(outfile,"\n");
  222.     fprintf(outfile,"        }\n");
  223.     fprintf(outfile,"    }\n");
  224.     fprintf(outfile,"\n");
  225.     fprintf(outfile,"    return (WinDefWindowProc(hwnd, msg, mp1, mp2));\n");
  226.     fprintf(outfile,"}\n");
  227.     fprintf(outfile,"\n\n");
  228.     fprintf(outfile,"/**********************************************************************/\n");
  229.     fprintf(outfile,"/*                                                                    */\n");
  230.     fprintf(outfile,"/* ROUTINE: MRESULT CALLBACK aboutdlgproc(hwnd,msg,mp1,mp2)           */\n");
  231.     fprintf(outfile,"/*                                                                    */\n");
  232.     fprintf(outfile,"/* DESCRIPTION:                                                       */\n");
  233.     fprintf(outfile,"/*                                                                    */\n");
  234.     fprintf(outfile,"/* ON ENTRY:                                                          */\n");
  235.     fprintf(outfile,"/*                                                                    */\n");
  236.     fprintf(outfile,"/* ON EXIT:                                                           */\n");
  237.     fprintf(outfile,"/*                                                                    */\n");
  238.     fprintf(outfile,"/**********************************************************************/\n");
  239.     fprintf(outfile,"\n");
  240.     fprintf(outfile,"MRESULT CALLBACK aboutdlgproc(HWND hwnd,USHORT msg,MPARAM mp1,MPARAM mp2)\n");
  241.     fprintf(outfile,"\n");
  242.     fprintf(outfile,"{\n");
  243.     fprintf(outfile,"    return WinDefDlgProc(hwnd,msg,mp1,mp2);\n");
  244.     fprintf(outfile,"}\n");
  245.     fclose(outfile);
  246.     printf("Wrote file %s\n",filename);
  247.  
  248.     *tmpptr = '\0';
  249.     strcat(filename,".DEF");
  250.  
  251.     /* create linker DEFinition file */
  252.     outfile = fopen(filename,"wt");
  253.     if (outfile == NULL) {
  254.         printf("Can't create file %s",filename);
  255.         return;
  256.     }
  257.     fprintf(outfile,";linker definition file for %s\n",projname);
  258.     fprintf(outfile,"NAME    %s     WINDOWAPI\n",projname);
  259.     fprintf(outfile,"DESCRIPTION 'PM %s application'\n");
  260.     fprintf(outfile,"STUB    'OS2STUB.EXE'\n");
  261.     fclose(outfile);
  262.     printf("Wrote file %s\n",filename);
  263.  
  264.     *tmpptr = '\0';
  265.     strcat(filename,".RC");
  266.  
  267.     /* create Resource Compiler source file */
  268.     outfile = fopen(filename,"wt\n");
  269.     if (outfile == NULL) {
  270.         printf("Can't create file %s",filename);
  271.         return;
  272.     }
  273.     fprintf(outfile,"#include \"os2.h\"\n");
  274.     fprintf(outfile,"#include \"%s.h\"\n",projname);
  275.     fprintf(outfile,"\n");
  276.     fprintf(outfile,"ICON FRAMERESID %s.ico\n",projname);
  277.     fprintf(outfile,"\n");
  278.     fprintf(outfile,"MENU FRAMERESID\n");
  279.     fprintf(outfile,"BEGIN\n");
  280.     fprintf(outfile,"    SUBMENU           \"~File\", 2\n");
  281.     fprintf(outfile,"    BEGIN\n");
  282.     fprintf(outfile,"          MENUITEM    \"~New\",            IDM_NEW, MIS_TEXT\n");
  283.     fprintf(outfile,"          MENUITEM    \"~Open...\",        IDM_OPEN\n");
  284.     fprintf(outfile,"          MENUITEM    \"~Save\",           IDM_SAVE\n");
  285.     fprintf(outfile,"          MENUITEM    \"Save ~As...\",     IDM_SAVEAS\n");
  286.     fprintf(outfile,"          MENUITEM    \"~Print\",          IDM_PRINT\n");
  287.     fprintf(outfile,"          MENUITEM    \"\",                IDM_PRINT, MIS_SEPARATOR\n");
  288.     fprintf(outfile,"          MENUITEM    \"E~xit %s\",     IDM_EXIT, MIS_TEXT\n",projname);
  289.     fprintf(outfile,"    END\n");
  290.     fprintf(outfile,"\n");
  291.     fprintf(outfile,"    SUBMENU           \"~Edit\", 3\n");
  292.     fprintf(outfile,"    BEGIN\n");
  293.     fprintf(outfile,"          MENUITEM    \"~Undo\tALT+BKSP\",   IDM_UNDO,MIS_TEXT,MIA_DISABLED\n");
  294.     fprintf(outfile,"          MENUITEM    \"\",                  IDM_UNDO,MIS_SEPARATOR         \n");
  295.     fprintf(outfile,"          MENUITEM    \"Cu~t\tShift+Del\",   IDM_CUT,MIS_TEXT,MIA_DISABLED\n");
  296.     fprintf(outfile,"          MENUITEM    \"~Copy\tCtrl+Ins\",   IDM_COPY,MIS_TEXT,MIA_DISABLED\n");
  297.     fprintf(outfile,"          MENUITEM    \"~Paste\tShift+Ins\", IDM_PASTE,MIS_TEXT,MIA_DISABLED\n");
  298.     fprintf(outfile,"          MENUITEM    \"C~lear\tDel\",       IDM_CLEAR,MIS_TEXT,MIA_DISABLED\n");
  299.     fprintf(outfile,"    END\n");
  300.     fprintf(outfile,"    SUBMENU           \"~Help\", 4\n");
  301.     fprintf(outfile,"    BEGIN\n");
  302.     fprintf(outfile,"          MENUITEM    \"A~bout %s...\",    IDM_ABOUT\n",projname);
  303.     fprintf(outfile,"    END\n");
  304.     fprintf(outfile,"END\n");
  305.     fprintf(outfile,"\n");
  306.     fprintf(outfile,"\n");
  307.     fprintf(outfile,"ACCELTABLE FRAMERESID\n");
  308.     fprintf(outfile,"BEGIN\n");
  309.     fprintf(outfile,"    VK_BACKSPACE,   IDM_UNDO,  VIRTUALKEY, ALT\n");
  310.     fprintf(outfile,"    VK_DELETE,      IDM_CUT,   VIRTUALKEY, LONEKEY\n");
  311.     fprintf(outfile,"    VK_INSERT,      IDM_COPY,  VIRTUALKEY, CONTROL\n");
  312.     fprintf(outfile,"    VK_INSERT,      IDM_PASTE, VIRTUALKEY, SHIFT\n");
  313.     fprintf(outfile,"    VK_DELETE,      IDM_CLEAR, VIRTUALKEY, SHIFT\n");
  314.     fprintf(outfile,"END\n");
  315.     fprintf(outfile,"\n");
  316.     fprintf(outfile,"\n");
  317.     fprintf(outfile,"RCINCLUDE %s.dlg\n",projname);
  318.     fclose(outfile);
  319.     printf("Wrote file %s\n",filename);
  320.  
  321.     *tmpptr = '\0';
  322.     strcat(filename,".LNK");
  323.  
  324.     /* create LiNKer input file */
  325.     outfile = fopen(filename,"wt");
  326.     if (outfile == NULL) {
  327.         printf("Can't create file %s",filename);
  328.         return;
  329.     }
  330.     fprintf(outfile,"%s\n",projname);
  331.     fprintf(outfile,"%s /align:16 /CO /NOD\n",projname);
  332.     fprintf(outfile,"%s /map\n",projname);
  333.     fprintf(outfile,"llibce os2\n");
  334.     fprintf(outfile,"%s.def\n",projname);
  335.     fclose(outfile);
  336.     printf("Wrote file %s\n",filename);
  337.  
  338.     *tmpptr = '\0';
  339.     strcat(filename,".H");
  340.  
  341.     /* create Header file */
  342.     outfile = fopen(filename,"wt");
  343.     if (outfile == NULL) {
  344.         printf("Can't create file %s",filename);
  345.         return;
  346.     }
  347.     fprintf(outfile,"/* file menu items */\n");
  348.     fprintf(outfile,"\n");
  349.     fprintf(outfile,"#define     IDM_NEW      100\n");
  350.     fprintf(outfile,"#define     IDM_OPEN     101\n");
  351.     fprintf(outfile,"#define     IDM_SAVE     102\n");
  352.     fprintf(outfile,"#define     IDM_SAVEAS   103\n");
  353.     fprintf(outfile,"#define     IDM_PRINT    104\n");
  354.     fprintf(outfile,"#define     IDM_EXIT     105\n");
  355.     fprintf(outfile,"\n");
  356.     fprintf(outfile,"/* edit menu items */\n");
  357.     fprintf(outfile,"\n");
  358.     fprintf(outfile,"#define     IDM_UNDO     200\n");
  359.     fprintf(outfile,"#define     IDM_CUT      201\n");
  360.     fprintf(outfile,"#define     IDM_COPY     202\n");
  361.     fprintf(outfile,"#define     IDM_PASTE    203\n");
  362.     fprintf(outfile,"#define     IDM_CLEAR    204\n");
  363.     fprintf(outfile,"\n");
  364.     fprintf(outfile,"/* help menu items */\n");
  365.     fprintf(outfile,"\n");
  366.     fprintf(outfile,"#define     IDM_ABOUT    106\n");
  367.     fprintf(outfile,"\n");
  368.     fprintf(outfile,"/* Dialog and Resource IDs */\n");
  369.     fprintf(outfile,"\n");
  370.     fprintf(outfile,"#define     FRAMERESID    49\n");
  371.     fprintf(outfile,"#define     IDD_ABOUT    101\n");
  372.     fprintf(outfile,"\n");
  373.     fprintf(outfile,"/* function prototypes */\n");
  374.     fprintf(outfile,"\n");
  375.     fprintf(outfile,"MRESULT CALLBACK %swindproc(HWND,USHORT,MPARAM,MPARAM);\n",projname);
  376.     fprintf(outfile,"MRESULT CALLBACK aboutdlgproc(HWND,USHORT,MPARAM,MPARAM);\n");
  377.     fclose(outfile);
  378.     printf("Wrote file %s\n",filename);
  379.  
  380.     *tmpptr = '\0';
  381.     strcat(filename,".DLG");
  382.  
  383.     /* create DiaLoG file */
  384.     outfile = fopen(filename,"wt");
  385.     if (outfile == NULL) {
  386.         printf("Can't create file %s",filename);
  387.         return;
  388.     }
  389.     fprintf(outfile,"DLGTEMPLATE IDD_ABOUT LOADONCALL MOVEABLE DISCARDABLE \n");
  390.     fprintf(outfile,"BEGIN\n");
  391.     fprintf(outfile,"    DIALOG \"\", IDD_ABOUT, 29, 74, 144, 43, FS_NOBYTEALIGN | FS_DLGBORDER | \n");
  392.     fprintf(outfile,"                WS_CLIPSIBLINGS | WS_SAVEBITS\n");
  393.     fprintf(outfile,"    BEGIN\n");
  394.     fprintf(outfile,"        CONTROL \"Project Creator\", 2, 33, 15, 112, 8, WC_STATIC, \n");
  395.     fprintf(outfile,"                SS_TEXT | DT_CENTER | DT_TOP | WS_GROUP | WS_VISIBLE\n");
  396.     fprintf(outfile,"        CONTROL \"Generic Application\", 3, 37, 26, 108, 8, WC_STATIC, SS_TEXT | \n");
  397.     fprintf(outfile,"                DT_CENTER | DT_TOP | WS_GROUP | WS_VISIBLE\n");
  398.     fprintf(outfile,"        CONTROL \"Version 1.0\", 4, 41, 2, 102, 8, WC_STATIC, SS_TEXT | DT_CENTER | \n");
  399.     fprintf(outfile,"                DT_TOP | WS_GROUP | WS_VISIBLE\n");
  400.     fprintf(outfile,"        CONTROL \"OK\", 1, 5, 2, 32, 14, WC_BUTTON, BS_PUSHBUTTON | BS_DEFAULT | \n");
  401.     fprintf(outfile,"                WS_GROUP | WS_TABSTOP | WS_VISIBLE\n");
  402.     fprintf(outfile,"    END\n");
  403.     fprintf(outfile,"END\n");
  404.     fprintf(outfile,"\n");
  405.     fclose(outfile);
  406.     printf("Wrote file %s\n\n",filename);
  407. }
  408.