I'm not quite sure these are 100% well written,
because I'm coding C for about 2 months now at school,
whitch isn't quite much.
So verify the code and tell me if there are
modifications to be done to do the same as with
Borland's CONIO.C
mail me @ :
michael.denecker.website@freegates.be
for any comment.
Just add this source into your CONIO.C
(in the 'include' dir of devc++)
void clreol( ) {
COORD coord;
DWORD written;
CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo(GetStdHandle
(STD_OUTPUT_HANDLE), &info);
coord.X = info.dwCursorPosition.X;
coord.Y = info.dwCursorPosition.Y;
FillConsoleOutputCharacter (GetStdHandle
(STD_OUTPUT_HANDLE), ' ',
info.dwSize.X - info.dwCursorPosition.X *
info.dwCursorPosition.Y, coord, &written);
gotoxy (info.dwCursorPosition.X + 1,
info.dwCursorPosition.Y + 1);
}
void delline( ) {
COORD coord;
DWORD written;
CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo(GetStdHandle
(STD_OUTPUT_HANDLE), &info);
coord.X = info.dwCursorPosition.X;
coord.Y = info.dwCursorPosition.Y;
FillConsoleOutputCharacter (GetStdHandle
(STD_OUTPUT_HANDLE), ' ',
info.dwSize.X * info.dwCursorPosition.Y, coord,
&written);
gotoxy (info.dwCursorPosition.X + 1,
info.dwCursorPosition.Y + 1);
}
Logged In: YES
user_id=301598
Ha, I came here to submit some very similar code that
appears to work perfectly from my tests. It goes a little
something like this:
void clreol() {
COORD coord;
DWORD written;
CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo(GetStdHandle
(STD_OUTPUT_HANDLE), &info);
coord.X = info.dwCursorPosition.X;
coord.Y = info.dwCursorPosition.Y;
FillConsoleOutputCharacter(GetStdHandle
(STD_OUTPUT_HANDLE), ' ',
info.dwSize.X - info.dwCursorPosition.X, coord,
&written);
gotoxy(coord.X, coord.Y);
}
Of course the clrscr() code is a dead giveaway for what
these functions are supposed to look like, which is why I
was surprised to find that they weren't implemented.
Logged In: YES
user_id=37342
Thanks! Your code is now merged with ours.