C语言 隐藏滚动条

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/LittleWhiteLv/article/details/80619078
//隐藏滚动条 
#include <windows.h>
#include <conio.h>
SMALL_RECT SizeOfWindow(HANDLE hConsoleOutput) {
    CONSOLE_SCREEN_BUFFER_INFO info;
    GetConsoleScreenBufferInfo(hConsoleOutput, &info);
    return info.srWindow;
}  
int main() {  
    HANDLE handle_out; 
    CONSOLE_SCREEN_BUFFER_INFO info;
    handle_out = GetStdHandle(STD_OUTPUT_HANDLE);
    GetConsoleScreenBufferInfo(handle_out, &info);
    SMALL_RECT rect =SizeOfWindow(handle_out);
    COORD size={rect.Right+1,rect.Bottom+1};	//定义缓冲区大小 
    SetConsoleScreenBufferSize(handle_out, size);
    CloseHandle(handle_out);
}

 

展开阅读全文

没有更多推荐了,返回首页