Текущий архив: 2008.04.27;
Скачать: CL | DM;
Вниз
Графика в консоли Найти похожие ветки
← →
-=Domix=- (2007-08-29 12:58) [0]проблема такая не могу изменить цвет фона в консоли
const
YellowOnBlue = FOREGROUND_GREEN or FOREGROUND_RED or
FOREGROUND_INTENSITY or BACKGROUND_BLUE;
...
FillConsoleOutputAttribute(Handle_Out, YellowOnBlue, MaxX * MaxY, Coord, NOAW);
ето не помогает
← →
Lacmus © (2007-08-29 18:55) [1]Пример из MSDN
program Project42;
{$APPTYPE CONSOLE}
uses
Windows, SysUtils;
var
coord: Tcoord;
chFillChar: Char;
fSuccess: Bool;
hStdout: THandle;
cWritten: DWord;
wColor: Word;
begin
hStdout := GetStdHandle(STD_OUTPUT_HANDLE);
try
coord.X := 0; // start at first cell
coord.Y := 0; // of first row
chFillChar := " ";
fSuccess := FillConsoleOutputCharacter(
hStdout, // screen buffer handle
chFillChar, // fill with spaces
80*50, // number of cells to fill
coord, // first cell to write to
cWritten); // actual number written
if fSuccess then begin
wColor := BACKGROUND_RED or
FOREGROUND_RED or
FOREGROUND_GREEN or
FOREGROUND_BLUE;
fSuccess := FillConsoleOutputAttribute(
hStdout, // screen buffer handle
wColor, // color to fill with
80*50, // number of cells to fill
coord, // first cell to write to
cWritten); // actual number written
end;
Readln
except
on E:Exception do
Writeln(E.Classname, ": ", E.Message);
end;
end.
Страницы: 1 вся ветка
Текущий архив: 2008.04.27;
Скачать: CL | DM;
Память: 0.47 MB
Время: 0.02 c