Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Argh !!! Build always does rebuild all !!! Pin
30-Jan-01 21:22
suss30-Jan-01 21:22 
GeneralRe: Argh !!! Build always does rebuild all !!! Pin
l a u r e n31-Jan-01 9:41
l a u r e n31-Jan-01 9:41 
GeneralClosing a DOS box Pin
30-Jan-01 13:25
suss30-Jan-01 13:25 
GeneralRe: Closing a DOS box Pin
30-Jan-01 14:04
suss30-Jan-01 14:04 
QuestionListBox?? Pin
30-Jan-01 11:12
suss30-Jan-01 11:12 
AnswerRe: ListBox?? Pin
Christian Graus30-Jan-01 13:58
protectorChristian Graus30-Jan-01 13:58 
GeneralRe: ListBox?? Pin
31-Jan-01 2:08
suss31-Jan-01 2:08 
GeneralRe: ListBox?? Pin
David Fedolfi31-Jan-01 3:02
David Fedolfi31-Jan-01 3:02 
You want it to be:

void CMenuDlg::StartGame()
{
if (m_Games.GetLbText(m_Games.GetCurSel()) == "Tribes")
{
//Do Somthing
}
}

There ia an aletrnative (and possible easier approach). Since you are obviously using this as an application launcher, you coudl store the command line you are executing as m_Games's Item data. Something like teh following;

m_Games.SetItemData(m_Games.InsertItem("Tribes"), DWORD("c:\\program files\\tribes\\tribes.exe"));

then your start game function woudl look like:

CString strCommand = LPCSTR(m_Games.GetItemData(m_Games.GetCurSel()));

then call ShellExecute (or whatever you're using to launch the application) with strCommand.


Note - this post made before morning coffee and ius therefore subject to containing countless errors and typos.
GeneralRe: ListBox?? Pin
31-Jan-01 6:06
suss31-Jan-01 6:06 
GeneralRe: ListBox?? Pin
David Fedolfi1-Feb-01 3:00
David Fedolfi1-Feb-01 3:00 
GeneralRe: ListBox?? Pin
Søren Alsbjerg Hørup1-Feb-01 8:51
Søren Alsbjerg Hørup1-Feb-01 8:51 
GeneralTab Control's Pin
30-Jan-01 10:29
suss30-Jan-01 10:29 
GeneralUSB.... Pin
Joseph Dempsey30-Jan-01 9:56
Joseph Dempsey30-Jan-01 9:56 
GeneralRe: USB.... Pin
Brendan Tregear30-Jan-01 11:43
Brendan Tregear30-Jan-01 11:43 
GeneralStatic class problem Pin
30-Jan-01 7:06
suss30-Jan-01 7:06 
GeneralRe: Static class problem Pin
Jason Douglas30-Jan-01 8:48
professionalJason Douglas30-Jan-01 8:48 
GeneralRe: Static class problem Pin
Michael Dunn30-Jan-01 15:13
sitebuilderMichael Dunn30-Jan-01 15:13 
GeneralImplementing an undo Pin
30-Jan-01 5:43
suss30-Jan-01 5:43 
GeneralRe: Implementing an undo Pin
Christian Graus30-Jan-01 11:09
protectorChristian Graus30-Jan-01 11:09 
QuestionHow to store a put a template class into a CList object? Pin
leonwoo30-Jan-01 2:35
leonwoo30-Jan-01 2:35 
AnswerRe: How to store a put a template class into a CList object? Pin
Walter Gildersleeve30-Jan-01 5:02
Walter Gildersleeve30-Jan-01 5:02 
GeneralRe: How to store a put a template class into a CList object? Pin
leonwoo31-Jan-01 3:37
leonwoo31-Jan-01 3:37 
AnswerRe: How to store a put a template class into a CList object? Pin
Michael Dunn30-Jan-01 15:22
sitebuilderMichael Dunn30-Jan-01 15:22 
GeneralRe: How to store a put a template class into a CList object? Pin
leonwoo31-Jan-01 3:33
leonwoo31-Jan-01 3:33 
GeneralRe: How to store a put a template class into a CList object? Pin
Michael Dunn31-Jan-01 4:31
sitebuilderMichael Dunn31-Jan-01 4:31 

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.