/************************************************************ *** BootEd2 - Sample Cmm code to demonstrate uses of the *** *** spawn() function. *** ************************************************************/ #include #include #include MessageBox("This example CEnvi program will start\n" "NotePad to edit both C:\\Config.sys and\n" "C:\\Autoexec.bat, and then display them\n" "both on the screen together. This example\n" "is like BootEd1 but this uses spawn().", "BootEd2 - Description"); // start up two versions of notepad with the two files we care about Config = spawn(P_NOWAIT,"NotePad.exe"," c:\\Config.sys"); AutoExec = spawn(P_NOWAIT,"NotePad.exe","c:\\AutoExec.bat"); // position these two windows to fill the top-half and the bottom-half of // the screen ScreenWidth = GetSystemMetrics(SM_CXSCREEN); ScreenHeight = GetSystemMetrics(SM_CYSCREEN); MoveWindow(Config,0,0,ScreenWidth,ScreenHeight/2,True); MoveWindow(AutoExec,0,ScreenHeight/2,ScreenWidth,ScreenHeight/2,True);