Languages :: Pascal :: WinCRT Output using Turbo Pascal for Windows 1.5 |
|||
| By: MikeTucker |
Date: 01/04/2003 00:00:00 |
Points: 75 | Status: Answered Quality : Excellent |
|
I am trying to port to Turbo Pascal for Windows 1.5 a fairly large program that was originally written in Turbo Pascal for DOS. I need to do either colored characters or reverse video. I have been using the WinCRT unit to provide a 25 row by 80 column window. This works fine, but I can't get color or reverse video to work... I HAVE been able to get color to work using the SetTextColor procedure (using TextOut and pixel cursor addressing), but it doesn't work with the Write and Writeln (using 25 lines by 80 column cursor addressing) to the CRT. HELP!!??? |
|||
| By: VGR | Date: 02/04/2003 03:44:00 | Type : Comment |
|
| yes, because I'm afraid this inverse video worked with the old video units of TP accessing the video card directly. Apparently, there was no such support in TPW 1.5 and since then. AFAIK. I did the same work as you do, some years ago. For the text color, either TextColor still works, or you've to use Pen.Color (this is basic Win API so it should be available in TPW 1.5) I also strongly suggest you pass directly to Delphi 1 or 2 |
|||
| By: MikeTucker | Date: 02/04/2003 15:50:00 | Type : Comment |
|
| Yes, TextColor and BkColor will work, but display indexing is not on the 80 column by 25 line virtual CRT screen provided by the WinCRT unit. You must use cursor addressing based on the "pixel" addresses (I think). It may be possible to convert all 80 x 25 character addresses into pixel addresses? I'm not familiar with Delphi...does it support TPW source code, or is a completely different language? Thanks! |
|||
| By: MannSoft | Date: 03/04/2003 00:56:00 | Type : Comment |
|
| Delphi is what Borland dropped Turbo Pascal for. It is essentially just Object Pascal. It doesnt support TPW files since they are compiled units, but it'll work with a good majority of your old Turbo Pascal code, so long as it isnt DOS specific. I ported all my old stuff, and havent used Turbo Pascal in a long time. |
|||
| By: VGR | Date: 06/04/2003 04:31:00 | Type : Answer |
|
| delphi DOES support TPW 1.5 "source files", because : they either are Pascal (Turbo dialect, ie the core of Delphi), or they contain Win API calls, still available in Delphi even if usually people use the Borland "wrapper units" IMHO, it should even compile and run without any modification. T-Pascal for DOS is ano other story, for the reasons explained before (Int, Dos, Crt, etc are to be emulated on Windows - I did this partially) |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








