首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

求一段 E 文通译

2012-10-05 
求一段 E文翻译SetConsoleWindowInfoThe SetConsoleWindowInfo function sets the current size and posit

求一段 E 文翻译
SetConsoleWindowInfo

The SetConsoleWindowInfo function sets the current size and position of a console screen buffer's window.


BOOL SetConsoleWindowInfo(
  HANDLE hConsoleOutput,
  BOOL bAbsolute,
  const SMALL_RECT* lpConsoleWindow
);


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 offsets to the current window-corner coordinates. 

求上面参数为 false 的翻译?代码试验结果没发现窗体有变化



C/C++ code
#include <windows.h>#include <stdio.h>#include <conio.h>void main(){    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);     // 获取标准输出设备句柄    CONSOLE_SCREEN_BUFFER_INFO bInfo; // 窗口缓冲区信息    SMALL_RECT rc = {0,0, 80-50, 25-22}; // 重置窗口位置和大小    GetConsoleScreenBufferInfo(hOut, &bInfo );    _getch();    SetConsoleWindowInfo(hOut,false ,&rc);    GetConsoleScreenBufferInfo(hOut, &bInfo );    _getch();    CloseHandle(hOut); // 关闭标准输出设备句柄}



[解决办法]
If it is FALSE, the coordinates are offsets to the current window-corner coordinates. 

如果为False, 则坐标为到窗口边角坐标的偏移。
[解决办法]
如果它是错误的,坐标是对当前窗口角落坐标的距离 

[解决办法]
简单的中文解释下:
就是如果为true,就是绝对坐标,坐标指明了新窗口的左上右下坐标。 -- 例如当前窗口左上顶点为100,100 -- 你设置10,10 -- 则新的窗口坐标的左上顶点就是10,10
如果为false,就是相对坐标,是相对当前窗口的坐标偏移。 -- 例如当前窗口左上顶点为100,100 -- 你设置10,10 -- 则新窗口坐标的左上顶点就是110,110
明白否~?
[解决办法]
bAbsolute
绝对定位
[in]
输入值
If this parameter is TRUE, the coordinates specify the new upper-left and lower-right corners of the window.
TRUE表示绝对定位,坐标指明了窗口的新的左上角和右下角。
If it is FALSE, the coordinates are offsets to the current window-corner coordinates.
FALSE表示非绝对定位(相对定位),坐标是相对当前的角坐标的偏移。

[解决办法]
SetConsoleWindowInfo 

The SetConsoleWindowInfo function sets the current size and position of a console screen buffer's window. 

SetConsoleWindowInfo函数集的SetConsoleWindowInfo当前大小和位置的控制台屏幕缓冲区的窗口。


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 offsets to the current window-corner coordinates. 

bAbsolute [in]如果这个参数是TURE,指定新的坐标左上角和右下角的角落窗口。如果是FALSE ,则坐标偏移到当前窗口角坐标。




[解决办法]
up

热点排行