大家好!最近宅家写代码,没写个啥,问题好挺多,我都不好意思了(五年级小学生一枚,学了3个月)
#include <graphics.h>
#include <conio.h>
#include <time.h>
#include <stdio.h>
#include <windows.h>
#include <string>
using namespace std;
#pragma comment(lib,"Winmm.lib")
//全局变量
//MOUSEMSG鼠标消息
MOUSEMSG msg; //鼠标
//函数区
//拷贝图像
//放图片
//启动
//展示结果
//主函数
int main()
{
initgraph(1152, 648);
while (1)
{
msg = GetMouseMsg(); // 获取鼠标消息
if (msg.x >= 0 && msg.x <= 100 && msg.y >= 0 && msg.y <= 100)
{
HCURSOR hcur = (HCURSOR)LoadImage(NULL, _T("l.cur"), IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE);//此处我知道哪里有问题了,还没改
if (msg.uMsg == WM_LBUTTONDOWN)
{
outtextxy(10, 60, L"嗷呜,空空如也,这是人性的扭曲,还是道德的沦丧");
}
}
}
return 0;
}
坐标就是左上角的小正方形
就是不起作用,鼠标也不换,点击也不输出……求求帮我把,好人一路少bug!