我想在windows api函数中使用easyx的函数来输出文字,为啥我不用initgraph来创建easyx窗口的时候一使用绘图函数就会报错说函数试图向NULL写入数据呀。就算使用LOGFONT也是一样。
#include <easyx.h>
int main()
{
LOGFONTW Font;
gettextstyle(&Font); // 报错:试图读取 NULL
return 0;
}
#include <easyx.h>
#include <string.h>
int main()
{
LOGFONTW Font = { 0 };
wcsncpy(Font.lfFaceName, L"宋体", LF_FACESIZE);
settextstyle(&Font); // 报错:试图向 NULL 写入数据
return 0;
}