GDI+画图问题,如何用Graphics画图。

jerrywan 2007-02-13 09:09:04
Graphics graphics(hdc);

// Create an Image object.
Image image(L"climber.jpg");//

// Create an array of Point objects that specify the destination of the image.
Point destPoints[3] = {
Point(30, 30),
Point(250, 50),
Point(175, 120)};

Point* pdestPoints = destPoints;

// Draw the image.

Image image(L"climber.jpg");返回的结果如下:
- image {nativeImage=0x00000000 lastResult=OutOfMemory loadStatus=-858993460 } Gdiplus::Image

给点代码先,谢谢。
...全文
347 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
VcGreenhand 2007-02-16
  • 打赏
  • 举报
回复 1
估计是没有初始化Gdiplus吧
逸学堂 2007-02-14
  • 打赏
  • 举报
回复
GdiplusStartupInput gdiplusStartInput ;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartInput, NULL);
// 使用gdi+
GdiplusShutdown(gdiplusToken);
booklove 2007-02-14
  • 打赏
  • 举报
回复
要么是没初始化,要么是图片有问题。
一条晚起的虫 2007-02-13
  • 打赏
  • 举报
回复
VC6下使用?初始化了吗?
GdiplusStartupInput gdiplusStartInput ;
GdiplusStartup(&m_gdiplusToken, &gdiplusStartInput, NULL);

19,469

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧