What function is used to retrieve the currently selected
index in a list box?

Answers were Sorted based on User's Feedback



What function is used to retrieve the currently selected index in a list box? ..

Answer / arvin

GetCurSel() will be used to retrieve the index number and
GetText() is used to retrieve the text.

Example
int index;
CString strText;
index = m_ctlListBox.GetCurSel();
m_ListBox.GetText(index,strText);

Is This Answer Correct ?    6 Yes 0 No

What function is used to retrieve the currently selected index in a list box? ..

Answer / rani

GetCurSel()

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More MFC Interview Questions

How to handle dynamic menus in MFC?

3 Answers   HCL,


Tell me the different controls in MFC ?

5 Answers  


how does the UIThread and worker thread communicates and handle events

2 Answers   HCL,


Explain StretchBlt and BitBlt

1 Answers  


Whats is DDX & DDV in MFC?

1 Answers   HCL,






Which CPrintInfo member variable must be set for multiple page printouts?

1 Answers  


What is the base class for MFC

3 Answers   HCL,


How can server communicate with more than one client

2 Answers   Invensys,


I have 2 threads. One thread prints odd numbers and the second thread prints even numbers. Now, I have to execute the threads alternatively so that i can output 1,2,3,4,5,6,..... write code for this?

1 Answers  


how to give colour for dialog button or static buuto?any one explain full code ?pls pls

3 Answers  


Explain about MDI and CMultiDocTemplate ?

2 Answers  


What is the base class for MFC Framework ?

4 Answers  


Categories