Создание Эльфов : Эльфостроение : Форум

Страница 54 из 211: « 1 ... 50 51 52 53 [54] 55 56 57 58 ... 211 »

 narkodiler:
14.08.08, 18:48
 А как узнавать адреса функций??? Какие для этого нужны программы??? Например как узнать адрес функции 2А7???

 Joker XT:
14.08.08, 19:03
 Не туда попал, тебе в патчи...
И с твоими 2мя постами я сомневаюсь, что ты вообще чё нить портируешь...

 eddmund:
14.08.08, 23:38
 
Joker XT пишет:
get gui
GUI*(*(int*)((int)myBook+0x18));

Thanks for your help, Joker XT! I found that simply removing the line "myBook->gui=yn;" also worked:
Код: 
    GUI* yn=(GUI*)CreateYesNoQuestionVA(
      0,
      VAR_BOOK(myBook),
      VAR_YESNO_PRE_QUESTION(pre_question),
      VAR_YESNO_QUESTION(question),
      0
    );
    GUIObject_Softkey_SetAction(yn, ACTION_YES,  yn_onYes);
    GUIObject_Softkey_SetAction(yn, ACTION_NO,   yn_onNo);

I have one more question on CreateYesNoQuestionVA(). I am trying to add an icon to it, with
Код:
    int icon_id;
    if (iconidname2id(_T("DESKTOP_ORGANIZER_ICN"), -1, &icon_id)) {
      InputFeedback_SetIcon(yn, icon_id);
    }

but no icon appears. :-?

 jamesbond22:
15.08.08, 16:23
 Elf gui created by slw5201:




I know how create tab and headline. But how create this menu with 3 items "HELLO SEBBS"? Please help me.

 UltraShot:
15.08.08, 16:27
 jamesbond22
SetNumberOfMenuItem(gui,3); (old library, now I don't know name of function)
then in onLBMessage() set their names

 jamesbond22:
15.08.08, 16:37
 UltraShot
SetNumOfMenuItem(lo,3);
OneOfMany_SetonMessage((GUI_ONEOFMANY*)lo,onLBMessage);
OneOfMany_SetonMessage((GUI_ONEOFMANY*)lo,onLBMessage1);
OneOfMany_SetonMessage((GUI_ONEOFMANY*)lo,onLBMessage2);


int onLBMessage(GUI_MESSAGE * msg)
{
message1
}

int onLBMessage1(GUI_MESSAGE * msg)
{
message2
}

int onLBMessage2(GUI_MESSAGE * msg)
{
message3
}

that?


[ Edited by jamesbond22 в 15.8.08 14:46 ]

 UltraShot:
15.08.08, 16:49
 jamesbond22
in onLBMessageX phone sets items' names

 jamesbond22:
15.08.08, 17:02
 UltraShot
this example is ok?

Код: 
int onLBMessage(GUI_MESSAGE * msg)
{
  MyBOOK * myBook = (MyBOOK *) FindBook(isBook......);
  int item;
  SESSION_ITEM * si;
  switch(msg->msg)
  {
  case 1:
  item=GUIonMessage_GetCreatedItemIndex(msg);
  si=(SESSION_ITEM *)ListElement_GetByIndex(myBook->cfg_list,item);
  SetMenuItemText0(msg,Str2ID (L"HELLO SEBBS",0,100));
 }
return(1);
};


this fragment source code is ok?
Код:
  SetNumOfMenuItem(clist,3);
  SetMenuItemStyle(clist,3); 
  OneOfMany_SetonMessage((GUI_ONEOFMANY*)clist,onLBMessage);
  OneOfMany_SetonMessage((GUI_ONEOFMANY*)clist,onLBMessage1);
  OneOfMany_SetonMessage((GUI_ONEOFMANY*)clist,onLBMessage2);


[ Edited by jamesbond22 в 15.8.08 16:08 ]

 Joker XT:
15.08.08, 18:22
 int text = Str2ID (L"HELLO SEBBS",0,100);
SetMenuItemText0(msg,TextCopyId(text));


Добавлено 15.8.08 20:25

jamesbond22
this fragment source code is ok?

no

SetNumOfMenuItem(clist,3);
SetMenuItemStyle(clist,3);
OneOfMany_SetonMessage((GUI_ONEOFMANY*)clist,onLBMessage);

 jamesbond22:
15.08.08, 18:35
 Joker XT
SetNumOfMenuItem(clist,3);
SetMenuItemStyle(clist,3);
OneOfMany_SetonMessage((GUI_ONEOFMANY*)clist,onLBMessage);

ok, but then I get 1 text. How get 2 texts?

HELLO SEBBS = onLBMessage
HELLO SEBBS1 = onLBMessage1

I must use "else"?

Код: 
...
{
OneOfMany_SetonMessage((GUI_ONEOFMANY*)clist,onLBMessage);
}
else
{
OneOfMany_SetonMessage((GUI_ONEOFMANY*)clist,onLBMessage1);
}
...

that is ok?

[ Edited by jamesbond22 в 15.8.08 16:38 ]
Страница 54 из 211: « 1 ... 50 51 52 53 [54] 55 56 57 58 ... 211 »

URL этой темы:
https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=2479&start=530

© 2005-2018 supertrubka.org