关于 HANDLE的问题

#include<stdio.h> #include<windows.h> void Pos(int x,int y)//设置光标位置 { COORD pos; HANDLE hOutput; pos.X=x; pos.Y=y; hOutput=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hOutput,pos); } void creatMap()//创建地图 { int i; for(i=0;i<58;i+=2)//打印上下边框 { Pos(i,0); printf("■"); Pos(i,26); printf("■"); } for(i=1;i<26;i++)//打印左右边框 { Pos(0,i); printf("■"); Pos(56,i); printf("■"); } } int main() { creatMap(); }
这个谁能给我说下 hOutput=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOutput,pos);这2行有什么效果 如果能说下这2行的流程就更好了