大神来关注一下MouseHit吧
#include"graphics.h"#include"conio.h"
void main()
{
initgraph(640,480);
IMAGE p1,p2;
loadimage(&p1,"1/1.jpg",480,480);
loadimage(&p2,"1/2.jpg",480,480);
putimage(0,0,&p1);
if(MouseHit())
{
putimage(0,0,&p2);
}
getch();
closegraph();
}
为什么打开窗口后,我怎么点都是p1的图片呢??