VC 下 gotoxy()函数能不能与 graphics.h 中的函数公用
VC下装上easyX后,gotoxy()函数的坐标指定为什么不能与graphics.h中的函数画出的图形显示在一个dos界面下???gotoxy()函数时物理坐标 ,graphics.h头文件中的是画图函数时逻辑坐标,两者之间能不能转化??代码如下:
#include<stdio.h>
#include<windows.h>
#include<conio.h>
#include<graphics.h>
void gotoxy(HANDLE hOut,int x,int y)
{
COORD loc;
loc.X=x;
loc.Y=y;
SetConsoleCursorPosition(hOut,loc);
}
void face()
{
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode," ");
rectangle(50,30,100,150);
}
void help_inf()
{
HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
gotoxy(hOut,60,10);
printf("asdan");
gotoxy(hOut,100,50);
printf("**********:\n");
gotoxy(hOut,100,80);
printf("**********\n");
}
int main()
{
face();
help_inf();
getch();
return 0;
}
求大神!!!!!!