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

Explain in sort What is CTargetObject?

2 Answers  


1)How to change the size of a button at run time ?

1 Answers  


1)How to change a text of a button in runtime?

2 Answers  


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

1 Answers  


how to repaint when working with horizontal scroll bar

0 Answers  






How to convert a CString variable to char* or LPTSTR?

5 Answers   Dover,


Will there be any difference in the image buffer size if it is loaded in from CString to LPTSTR using GetBuffer()? lptstr = string.GetBuffer(0);

2 Answers  


What is the difference between regular dlls and extended dlls?

2 Answers  


What is the range of intensity of RGB

1 Answers  


What is a message map, and what is the advantage of a message map over virtual functions?

1 Answers  


What is CSingleDocTemplate?

1 Answers  


How you create a button dynamically?

2 Answers  


Categories