visual problem :/

0

yo! mam problem:
widze ze w VC++ jest conio.h ale clrscr,textcolor,gotoxy nie dzialaja. czy sa one w innej bibliotece czy jak. aha mam VC++ 6.0

0

Najprościej ;):
#include <stdlib.h>
system("cls");

Lepiej (miałem to na dysku i chyba pochodzi z MSDN):

#define PERR(bSuccess, api){if(!(bSuccess)) printf("%s:Error %d from %s \ 
on line %d\n", __FILE__, GetLastError(), api, __LINE__);} 

void cls( HANDLE hConsole ) 
{ 
COORD coordScreen = { 0, 0 }; /* here's where we'll home the 
cursor */ 
BOOL bSuccess; 
DWORD cCharsWritten; 
CONSOLE_SCREEN_BUFFER_INFO csbi; /* to get buffer info */ 
DWORD dwConSize; /* number of character cells in 
the current buffer */ 

/* get the number of character cells in the current buffer */ 

bSuccess = GetConsoleScreenBufferInfo( hConsole, &csbi ); 
PERR( bSuccess, "GetConsoleScreenBufferInfo" ); 
dwConSize = csbi.dwSize.X * csbi.dwSize.Y; 

/* fill the entire screen with blanks */ 

bSuccess = FillConsoleOutputCharacter( hConsole, (TCHAR) ' ', 
dwConSize, coordScreen, &cCharsWritten ); 
PERR( bSuccess, "FillConsoleOutputCharacter" ); 

/* get the current text attribute */ 

bSuccess = GetConsoleScreenBufferInfo( hConsole, &csbi ); 
PERR( bSuccess, "ConsoleScreenBufferInfo" ); 

/* now set the buffer's attributes accordingly */ 

bSuccess = FillConsoleOutputAttribute( hConsole, csbi.wAttributes, 
dwConSize, coordScreen, &cCharsWritten ); 
PERR( bSuccess, "FillConsoleOutputAttribute" ); 

/* put the cursor at (0, 0) */ 

bSuccess = SetConsoleCursorPosition( hConsole, coordScreen ); 
PERR( bSuccess, "SetConsoleCursorPosition" ); 
return; 
} 
0

a gotoxy i textcolor?

0

Tutaj: http://www.republika.pl/informa4/PLIKI/winkon.zip masz rozwiazanie swoich problemow.

1 użytkowników online, w tym zalogowanych: 0, gości: 1