★★求C++控制台的设置窗体位置及大小的函数【SetConsoleWindowInfo】的使用方法!

2025-05-31 19:30:38
推荐回答(1个)
回答1:

SetConsoleWindowInfo
hConsoleOutput [in]
A handle to the console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights.

bAbsolute [in]
If this parameter is TRUE, the coordinates specify the new upper-left and lower-right corners of the window. If it is FALSE, the coordinates are relative to the current window-corner coordinates.

lpConsoleWindow [in]
A pointer to a SMALL_RECT structure that specifies the new upper-left and lower-right corners of the window.

http://msdn.microsoft.com/zh-cn/ms686125
SetConsoleScreenBufferSize
hConsoleOutput [in]
A handle to the console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights.

dwSize [in]
A COORD structure that specifies the new size of the console screen buffer, in character rows and columns. The specified width and height cannot be less than the width and height of the console screen buffer's window. The specified dimensions also cannot be less than the minimum size allowed by the system. This minimum depends on the current font size for the console (selected by the user) and the SM_CXMIN and SM_CYMIN values returned by the GetSystemMetrics function.

http://msdn.microsoft.com/en-us/library/ms686044(VS.85).aspx

应该看的懂吧