|
楼主 |
发表于 2012-5-11 15:45:28
|
显示全部楼层
现在又要做定义一个数组,把.txt文档内容全部写上去,然后直接显示出来
const PU8 Harga_Sparepart[12][100]={
"No Part No. Part Name Price Type",
"1 0040013 RETAINER GEAR SHIFT CAM COMP MACHINED 4,700 NEO 110 All Type, RockZ 125",
};
void mmi_entry_harga_sparepart()
{
PS8 buffer;
S32 bufferSize;
U8 *guiBuffer;
MMI_BOOL entry_ret = MMI_FALSE;
//S8 uni_s[HARGA_MAX_LENGTH * 2 + 2];
S8 uni_s[12][100];
//S8 ansii_str[HARGA_MAX_LENGTH + 1];
entry_ret = mmi_frm_scrn_enter (GRP_ID_ROOT, GRP_ID_HARGA_SPAREPART_MAIN, NULL, mmi_entry_harga_sparepart, 0);
if (!entry_ret)
{
kal_prompt_trace(MOD_MMI, "Misstion is imposible");
return;
}
guiBuffer = mmi_frm_scrn_get_gui_buf(GRP_ID_ROOT, GRP_ID_HARGA_SPAREPART_MAIN);
mmi_asc_to_ucs2((S8*)uni_s, Harga_Sparepart);
//mmi_ucs2cat((CHAR *)uni_s, (CHAR *)Harga_Sparepart);
buffer = uni_s;
bufferSize = mmi_ucs2strlen(buffer);
ShowCategory74Screen(
GetString(STR_ID_TV_MENU_HARGA_SPAREPART),
0,
0,
0,
STR_GLOBAL_BACK,
IMG_GLOBAL_BACK,
(PU8) buffer,
bufferSize,
guiBuffer);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
}
然后我这么写的话,会报错,"plutommi/mmi/mainmenu/mainmenusrc/mainmenu.c", line 5547: Error: #167: argument of type "const PU8 (*)[100]" is incompatible with parameter of type "CHAR *"
mmi_asc_to_ucs2((S8*)uni_s, Harga_Sparepart);
^
"plutommi/mmi/mainmenu/mainmenusrc/mainmenu.c", line 5549: Error: #513: a value of type "S8 (*)[202]" cannot be assigned to an entity of type "PS8"
buffer = uni_s;
真心觉得这些类型搞得人头痛啊,有高人指点一下么……[em08] |
|