#include<iostream.h>
#include<Windows.h>
int main()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SMALL_RECT rc;
rc.Left = 5;
rc.Top = 5;
rc.Right = 55;
rc.Bottom = 20; //此时窗口的宽度为50,高度为20
SetConsoleWindowInfo(hOut, TRUE, &rc);
for (int i = 0; i < 10; ++i)
cout << "+++++++++" << i << endl;
cout << "1111111111" << endl; cin.get();
return 0;
}
c++课程设计 控制台滚动条代码
于 2022-12-22 11:04:37 首次发布