0
价值
1
回答
浏览
settextcolor在类中不能用?
在类的实现cpp中set开头的函数比如setbkmode,setfillcolor,settextstyle,setlinestyle,setlinecolor都起作用,唯有settextcolor设置后不起作用,在主函数中没问题,只好用win32的SetTextColor(GetImageHDC(),m_textcolor)来实现。
UINT m_align=DT_CENTER|DT_VCENTER|DT_SINGLELINE;
RECT r={left,top,left+width,top+height};
se
0
价值
1
回答
浏览
0x500275BC (vcruntime140d.dll)处(位于 1.exe 中)引发的异常: 0xC0000005: 写入位置 0x00000000 时发生访问冲突
0x500275BC (vcruntime140d.dll)处(位于 1.exe 中)引发的异常: 0xC0000005: 写入位置 0x00000000 时发生访问冲突
IMAGE* imgZhiwu[ZHI_WU_COUNT][50];
//植物卡牌
for (int i = 0; i < ZHI_WU_COUNT; i++)
{
sprintf_s(name, sizeof(name), "res\\Cards\\%d.png", i + 1);
loadimage(&imgCards[i
0
价值
1
回答
浏览
请问下了easyx但visual studio里面仍然用不了graphics.h库是怎么回事
请问下了easyx但visual studio里面仍然用不了graphics.h库是怎么回事
0
价值
1
回答
浏览
用CMAKE 加 VSCODE 构建编译报错。问题出在哪里,该怎么解决
[build] D:/Programs/Microsoft VS Code/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/vscode/lib/libeasyx.a(EasyX.GraphWnd.o):EasyX.GraphWnd.cpp:(.text+0x198c): undefined reference to `__imp___iob_func'
[build] collect2.exe: error: ld returned 1 exi
0
价值
1
回答
浏览
求教,在visual studio上可能是应malloc缺陷导致的“访问冲突”问题
在windows,2022版visual studio上,使用 默认(ISO C++14 标准)、默认(ISO C++14 标准) 的C/C++语言。
大概率是以下代码的问题
// 定义函数指针类型
typedef void (*Func)(Unit*);
//定义画图函数指针数组;
extern Func _drawFunc[100] = { NULL };
Func drawFuncP;
drawFuncP = _drawFunc[unit->type.shape]; // 获取画图函数指
0
价值
1
回答
浏览
为什么无法使用loadimage函数
include<easyx.h>
#include<graphics.h>
int/*主函数*/ main() {
IMAGE* img;
loadimage(&img, "C:/1/图片/冰雪点卡版/2.bmp", 1600, 900, 0);
printf("Image loaded successfully.\n");
return 0;/*返回0正常退出*/
}
上述代码在用loadimage加载图片,哪里有问题导致无法加载图片
0
价值
1
回答
浏览
EasyX安装问题
为什么这个下载之后在codeblocks上没法用(当我直接打开visual studio就可以直接用可是codeblocks不行),当我把那个vs里的有关easyx.a还有graphycs,h静态文件复制到codeblocks的文件里面后,我的codeblocks不知道为啥被卸载了,运行不了了.
PS:我的电脑是64位系统,然后下载有visual studio 2022,codeblocks.
0
价值
1
回答
浏览
前一个问题已解决。
因为按键按下,会有DOWN 和UP 两种状态~哈哈
void handleUserEvents(ExMessage* msg,Snake *snake,Food *food) {
//ExMessage msg;
Direction dir = snake->direction;
while (peekmessage(msg, EX_KEY,true)) {
std::cout << "PeekMessageA" << std::en
0
价值
1
回答
浏览
vs2022安装easyx之后识别不了
为什么我安装完了easyx库之后,运行时显示无法打开显示No such file or directory。还有graphics咋安装啊。求大神解答。
0
价值
1
回答
浏览
程序可以运行但是没法播放音乐
#include <stdio.h>
#include <easyx.h>
#include <stdlib.h>
#include <time.h>
#include <mmsystem.h>
#pragma comment(lib,"winmm.lib")
IMAGE img_bk[2];
void loadImg()
{
loadimage(img_bk + 0, L".//images//welcome.jpg"
0
价值
2
回答
浏览
错误 C2665 “drawtext”: 没有重载函数可以转换所有参数类型 字符已经由unicode改成多字符
错误 C2665 “drawtext”: 没有重载函数可以转换所有参数类型 字符已经由unicode改成多字符
#include<stdio.h>
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include
0
价值
1
回答
浏览
使用outtextxy函数时报错undefined reference
编译器使用tdm-gcc-10.3.0-2,easyx版本使用20240601。
报错显示 undefined reference to `outtextxy(int, int, wchar_t const*)'
#define UNICODE
#define _UNICODE
#include <easyx.h>
int main()
{
static TCHAR str[64];
//字符串输入代码......
outtextxy(0, 0, str);
}
0
价值
1
回答
浏览
setorigin 与 鼠标坐标
请教一个各位大佬,我在easyx中进行了中心偏移后,绘制图形能够按偏移后的中心计算坐标。
为什么鼠标的坐标还是按窗口左上角计算?是偏移坐标对鼠标不起作用吗?
可以让鼠标的坐标也按偏移后的坐标中心,进行计算吗?
谢谢
#include<easyx_graphics.h>
#include<iostream>
using namespace std;
int main() {
initgraph(600, 600,EX_SHOWCONSOLE);
d
0
价值
1
回答
浏览
鼠标移动时lbutton不稳定
我实现了如下的一个Button控件,按照预期,flushStatus仅在上一帧未按下且本帧按下时为 CLICKED。
我通过peekmessage(&mouseMsg, EX_MOUSE)获取鼠标信息并将它传入Button::flushStatus。但是在实际测试中,如果保持鼠标左键按下,在按钮范围内移动鼠标,此时许多次返回了CLICKED。这是为什么?应该如何改进?
//VS2022+Easyx20240601
#pragma once
#include "Utils.h"
class