Danke - und laß hören/sehenBlocktronic hat geschrieben: ...
Insofern sehe ich es als sehr Positiv an, da nun etwas neues entstehen wird.
Vermutlich werde ich dieses Terminal für Windows dann auch als Freeware in die Welt entlassen.
...

Gruß VT
Danke - und laß hören/sehenBlocktronic hat geschrieben: ...
Insofern sehe ich es als sehr Positiv an, da nun etwas neues entstehen wird.
Vermutlich werde ich dieses Terminal für Windows dann auch als Freeware in die Welt entlassen.
...
Code: Alles auswählen
with Font do begin
Charset := OEM_CHARSET;
Color := 0;
Height := 0;
Name := 'Terminal';
Pitch := fpDefault;
Size := 24;
Style := [fsBold, fsItalic, fsUnderline, fsStrikeOut];
Style := [];
end;
Code: Alles auswählen
program project1;
uses
Windows;
procedure OutCharXY(x, y: integer; ch: char; col: byte);
var
numChars: integer = 1;
c: coord;
p: longword = 0;
begin
c.X := x;
c.Y := y;
FillConsoleOutputAttribute(GetStdHandle(STD_OUTPUT_HANDLE), col,
numChars, c, p);
FillConsoleOutputCharacter(GetStdHandle(STD_OUTPUT_HANDLE), ch,
numChars, c, p);
end;
var
i: integer;
begin
for i := 0 to 255 do begin
OutCharXY(i mod 16 * 2, i div 16, char(i), 7);
end;
readln;
end.
Code: Alles auswählen
procedure WriteStr(const s: string);
var
WritePos: Coord; { Upper-left cell to write from }
numWritten : DWord;
WinAttr : word;
i: integer;
begin
WritePos.X:=currX-2;
WritePos.Y:=currY-1;
WinAttr:=TextAttr;
for i:=1 to Length(s) do
begin
Inc(WritePos.X);
WriteConsoleOutputCharacter(GetStdhandle(STD_OUTPUT_HANDLE), @s[i], 1, writePos, numWritten);
WriteConsoleOutputAttribute(GetStdhandle(STD_OUTPUT_HANDLE),@WinAttr, 1, writePos, numWritten);
Inc(CurrX);
if CurrX>WindMaxX then
begin
CurrX:=WindMinX;
Inc(CurrY);
While CurrY>WindMaxY do
begin
RemoveLine(1);
Dec(CurrY);
end;
WritePos.X:=currX-2;
WritePos.Y:=currY-1;
end;
end;
end;
Code: Alles auswählen
procedure WriteStr(const s: WideString);
var WritePos : Coord; { Upper-left cell to write from }
numWritten : DWord;
numWrite : DWord;
sLen : DWord;
WinAttr : Array [1..255] of word;
i : integer;
begin
WritePos.X := currX-2;
WritePos.Y := currY-1;
FillWord(WinAttr,255,TextAttr);
sLen := Length(s);
i := 1;
Repeat
Inc(WritePos.X);
numWrite := Min(WindMaxX-CurrX+1,sLen+1-i);
WriteConsoleOutputCharacterW(GetStdhandle(STD_OUTPUT_HANDLE), @s[i], numWrite, writePos, numWritten);
WriteConsoleOutputAttribute(GetStdhandle(STD_OUTPUT_HANDLE),@WinAttr, numWrite, writePos, numWritten);
inc(CurrX,numWrite);
inc(i,numWrite);
if CurrX>WindMaxX then
begin
CurrX:=WindMinX;
Inc(CurrY);
While CurrY>WindMaxY do
begin
RemoveLine(1);
Dec(CurrY);
end;
WritePos.X:=currX-2;
WritePos.Y:=currY-1;
end;
Until (i>sLen);
end;
Braucht mMn nicht. Mit dem aktuellen Lazarus 1.6 kann man problemlos die verwendete Codepage der Windows Console verändern. Sie kann sogar UTF-8. Z.B.:Mathias hat geschrieben:Du könntest das mal hier melden:
Code: Alles auswählen
uses
..., setdefaultcodepages;
procedure TForm1.Button1Click(Sender: TObject);
begin
Writeln('Hallo Welt ÄÖÜ');
WriteLn('Hallo Welt, Hello world, Γειά σου κόσμος, Witaj świecie, Olá mundo und Здравствуйте мир');
end;
Code: Alles auswählen
type
TLiveSelection = (lsMoney, lsChilds, lsTime);
TLive = Array[0..1] of TLiveSelection;