当前位置: 代码迷 >> Brew >> Image的加载有关问题:如果从文件直接加载,在Widget上显示出不来
  详细解决方案

Image的加载有关问题:如果从文件直接加载,在Widget上显示出不来

热度:2975   发布时间:2013-02-26 00:00:00.0
Image的加载问题:如果从文件直接加载,在Widget上显示出不来
我想把一张图片显示在一个widget上, 但直接从文件Load时显示不出来.

 

//如果从资源文件Load,可以正常显示出来

//pMe->m_pImage = ISHELL_LoadResImage(pMe->applet.m_pIShell,"demo.bar",211);  

 

/*

如果直接从文件Load,显示为一片空白,是不是要把图片放在模拟器的某个特定目录? 我把图片文件放在$Sapphire (1.0.2.320)_1\fs\usermods\demo,但还是没加载成功

*/

pMe->m_pImage = ISHELL_LoadImage(pMe->applet.m_pIShell,"Demo_ico.png");

 

 

Demo.bar:

ModRsc {

  id = 211,

  type = 6, --RESTYPE_MIMETYPED (see AEEResType.h)

  data = ImageRscData("image/png", BytesOfFile("Demo_ico.png"))

}

模拟器目录结构:
C:\Brew MP\Targets\Sapphire (1.0.2.320)_1\fs\usermods\demo
---demo.bar
----demo.mif
----demo.dll
----Demo_ico.png



------解决方案--------------------------------------------------------
把图片名大写改成小写试一下!
  相关解决方案