pmf@mimsy.UUCP (Paul M. Franceus) (04/22/89)
Hi all- a question for you. I want to attach a CLI to a custom window. How do I go about this. I can attach a console device - passing the window to the console.device in OpenDevice, but now I want to attach a CLI to this window. any suggestions? Paul Franceus StarLight Technologies
papa@pollux.usc.edu (Marco Papa) (04/23/89)
In article <17054@mimsy.UUCP> pmf@mimsy.umd.edu.UUCP (Paul M. Franceus) writes: > >Hi all- a question for you. > I want to attach a CLI to a custom window. How do I go about this. I can >attach a console device - passing the window to the console.device in >OpenDevice, but now I want to attach a CLI to this window. any suggestions? I don't know how you can do it with a CUSTOM window, but you can easily do it with a CON: window opened with Open(). The code follows. Note that the Execute() won't return until ENDCLI is typed to the new CLI. static TransferCLI() { LONG error; struct FileHandle *inputfh, *Open(); LONG success; error = 0; inputfh = Open("CON:0/50/640/100/A-Talk Transfer CLI", MODE_NEWFILE); if (inputfh == (struct FileHandle *) 0) { error = -1; } else { WBenchToFront(); success = Execute("",inputfh, 0L); if (success == FALSE) error = -1; Close(inputfh); if (ScreenType) ScreenToFront(screen); } if (error != 0) auto_req2("Can't create CLI"); } -- Marco Papa 'Doc' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= uucp:...!pollux!papa BIX:papa ARPAnet:pollux!papa@oberon.usc.edu "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ugkamins@sunybcs.uucp (John Kaminski) (04/23/89)
In article <17054@mimsy.UUCP> pmf@mimsy.umd.edu.UUCP (Paul M. Franceus) writes:
=>
=>Hi all- a question for you.
=> I want to attach a CLI to a custom window. How do I go about this. I can
=>attach a console device - passing the window to the console.device in
=>OpenDevice, but now I want to attach a CLI to this window. any suggestions?
=>
=>Paul Franceus
=>StarLight Technologies
Yeah. Make a FileHandle that uses that unit of the console.device, then
pass a pointer to that FileHandle as the 2nd and 3rd args to Execute().
Don't ask me how to do that, but I'm sure if you dig thru the DOS manual
RKM:L&D, console.device sect., you ought to come up with a method.
---
a-WYSIWYG, a-WYSIWIG
a-WYSIWYG, a-WYSIWIG
a-WYSIWYG, a-WYSIWIG
a-WYSIWYG, a-WYSIWIG
In the jungle
The silicon jungle
The process sleeps tonight
gilham@polya.Stanford.EDU (Fred Gilham) (04/23/89)
In article <17054@mimsy.UUCP> pmf@mimsy.umd.edu.UUCP (Paul M. Franceus) writes: > but now I want to attach a CLI to this window. any suggestions? > >Paul Franceus >StarLight Technologies There is an example from fish 38 on how to do this: Window Sample program which shows how to create a DOS window in a custom screen. Author: Andy Finkel I have tried using this and it works. I have noticed a few problems but they are probably due to my ignorance. (You attach a cli by executing something like NewCLI from your program, using the handle you create with the above code). -Fred Gilham