Click here to Skip to main content
16,004,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: regular expressins performance Pin
Niklas L13-Jul-10 22:32
Niklas L13-Jul-10 22:32 
AnswerRe: regular expressins performance Pin
CPallini13-Jul-10 23:20
mveCPallini13-Jul-10 23:20 
QuestionHow to use progress bar in Property Sheet. Pin
cancerion13-Jul-10 21:23
cancerion13-Jul-10 21:23 
QuestionCan i set Float value to CLabelControl::SetCaption() Pin
raju_shiva13-Jul-10 19:24
raju_shiva13-Jul-10 19:24 
AnswerRe: Can i set Float value to CLabelControl::SetCaption() Pin
chandu00413-Jul-10 20:06
chandu00413-Jul-10 20:06 
QuestionListbox Selection Pin
T.RATHA KRISHNAN13-Jul-10 18:48
T.RATHA KRISHNAN13-Jul-10 18:48 
AnswerRe: Listbox Selection Pin
CPallini13-Jul-10 20:33
mveCPallini13-Jul-10 20:33 
GeneralRe: Listbox Selection Pin
T.RATHA KRISHNAN13-Jul-10 20:46
T.RATHA KRISHNAN13-Jul-10 20:46 
Hi!
Thanks for the reply. I'm getting the selected item index for List box2 using this line:
oppId = opplist->getSelected();. Then I'm trying to change the visiblity
of the corresponding item in list box1 using this code:

void CTeamSelectState::GUIEvent(CGameManager* pManager,const SEvent& event)
{
IGUIListBox *playerCty;
 if((event.GUIEvent.EventType == gui::EGET_LISTBOX_CHANGED)||(event.GUIEvent.EventType == gui::EGET_LISTBOX_SELECTED_AGAIN))
 {
  //IGUIListBox *playerlist = (IGUIListBox *)event.GUIEvent.Caller;
  IGUIListBox *opplist = (IGUIListBox *)event.GUIEvent.Caller;
  int oppId = opplist->getSelected();
  printf("oppId:%d \n",oppId);
  if(oppId >= 0 && oppId < 9)
   playerCtyExclude(oppId, playerCty);
  else
  {
   printf("Error:");
   return;
  }
 }
}


The function playerCtyExclude() is defined as follows:
void CTeamSelectState::playerCtyExclude(int oppId, IGUIListBox *player)
{
 //playerCty->getElementFromId(oppId)->setVisible(false);
 for(int i = 0; i < 9; i++)
 {
  if(i == oppId)
    player->getElementFromId(oppId)->setVisible(false);
  else
   player->getElementFromId(oppId)->setVisible(true);
 }
}


When I select any item in the second list box, application crashes. How to achieve my task?
GeneralRe: Listbox Selection Pin
CPallini13-Jul-10 21:03
mveCPallini13-Jul-10 21:03 
GeneralRe: Listbox Selection Pin
T.RATHA KRISHNAN13-Jul-10 21:07
T.RATHA KRISHNAN13-Jul-10 21:07 
QuestionRe: Listbox Selection Pin
CPallini13-Jul-10 21:48
mveCPallini13-Jul-10 21:48 
QuestionFloat to CString problem Pin
raju_shiva13-Jul-10 18:17
raju_shiva13-Jul-10 18:17 
AnswerRe: Float to CString problem Pin
chandu00413-Jul-10 20:12
chandu00413-Jul-10 20:12 
GeneralRe: Float to CString problem Pin
raju_shiva13-Jul-10 20:27
raju_shiva13-Jul-10 20:27 
GeneralRe: Float to CString problem Pin
chandu00413-Jul-10 21:17
chandu00413-Jul-10 21:17 
AnswerRe: Float to CString problem Pin
Niklas L13-Jul-10 21:14
Niklas L13-Jul-10 21:14 
AnswerRe: Float to CString problem Pin
Aescleal13-Jul-10 21:51
Aescleal13-Jul-10 21:51 
QuestionGetUserProfileDirectory Pin
Fareed Rizkalla13-Jul-10 15:37
Fareed Rizkalla13-Jul-10 15:37 
AnswerRe: GetUserProfileDirectory Pin
Richard MacCutchan13-Jul-10 21:59
mveRichard MacCutchan13-Jul-10 21:59 
Questionget logon and logoff event in an service on windows 2000 Pin
EverettJF13-Jul-10 15:05
EverettJF13-Jul-10 15:05 
Question10 & 10/3*3 are not equal ! ! ! WHY? Pin
hasani200713-Jul-10 9:32
hasani200713-Jul-10 9:32 
AnswerRe: 10 & 10/3*3 are not equal ! ! ! WHY? PinPopular
Maximilien13-Jul-10 9:55
Maximilien13-Jul-10 9:55 
GeneralRe: 10 & 10/3*3 are not equal ! ! ! WHY? Pin
Niklas L14-Jul-10 1:13
Niklas L14-Jul-10 1:13 
AnswerRe: 10 & 10/3*3 are not equal ! ! ! WHY? Pin
Niklas L13-Jul-10 9:56
Niklas L13-Jul-10 9:56 
AnswerRe: 10 & 10/3*3 are not equal ! ! ! WHY? Pin
EverettJF13-Jul-10 14:47
EverettJF13-Jul-10 14:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.