10-10-2006, 14:02
|
|
|
|
חבר מתאריך: 15.08.06
הודעות: 465
|
|
מימוש ל clrscr...
קוד PHP:
void clrscr(){ HANDLE hndl; DWORD nc, nc2; CONSOLE_SCREEN_BUFFER_INFO buffer; COORD xman; xman.X=xman.Y=0; hndl=GetStdHandle(STD_OUTPUT_HANDLE); if(hndl==INVALID_HANDLE_VALUE) return; GetConsoleScreenBufferInfo(hndl,&buffer); nc=buffer.dwSize.X*buffer.dwSize.Y; FillConsoleOutputAttribute(hndl,buffer.wAttributes ,nc,xman,&nc2); FillConsoleOutputCharacter(hndl,' ',nc,xman,&nc2); SetConsoleCursorPosition(hndl,xman); }
_____________________________________
Any sufficiently advanced bug is indistinguishable from a feature
|