home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / CENVIW9.ZIP / BOOTED2.CMM < prev    next >
Text File  |  1994-03-08  |  1KB  |  29 lines

  1. /************************************************************
  2.  *** BootEd2 - Sample Cmm code to demonstrate uses of the ***
  3.  *** ver.1     spawn() function.                          ***
  4.  ************************************************************/
  5.  
  6. #include <MsgBox.lib>
  7. #include <WinTools.lib>
  8.  
  9. MessageBox("This example CEnvi program will start\n"
  10.            "NotePad to edit both C:\\Config.sys and\n"
  11.            "C:\\Autoexec.bat, and then display them\n"
  12.            "both on the screen together.  This example\n"
  13.            "is like BootEd1 but this uses spawn().",
  14.            "BootEd2 - Description");
  15.  
  16. // start up two versions of notepad with the two files we care about
  17. Config = spawn(P_NOWAIT,"NotePad.exe"," c:\\Config.sys");
  18. AutoExec = spawn(P_NOWAIT,"NotePad.exe","c:\\AutoExec.bat");
  19.  
  20. // position these two windows to fill the top-half and the bottom-half of
  21. // the screen
  22. GetScreenSize(ScreenWidth,ScreenHeight);
  23.  
  24. SetSize (Config,ScreenWidth,ScreenHeight/2);
  25. SetPosition(Config,0,0);
  26. SetSize (AutoExec,ScreenWidth,ScreenHeight/2);
  27. SetPosition(AutoExec,0,ScreenHeight/2);
  28.  
  29.