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 you find memory leaks?

4 Answers   ABB,


is there any class which is not derived from Cobject

11 Answers   Patni,


How to find the mouse entering an image?..while entering need to display next image...

4 Answers  


1) create ToolTip in MFC?

2 Answers   HCL,


Name the Synchronization objects?

2 Answers  






How do I create a dialog box in mfc?

0 Answers  


What is the initial function to be called in MFC and what it will do

11 Answers   Infosys,


1)At run-time, you can change the icon by calling the LoadIcon() function?

2 Answers  


How we call a dialog in another dialog?

2 Answers  


What are the types of button controls?

10 Answers  


How many types of dialog box are their

10 Answers   Honeywell,


What is the base class for MFC

3 Answers   HCL,


Categories