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 command line arguements from simple MFC application ?

2 Answers   TCS,


if i modified data in 1 view how does the other view knows

2 Answers   Siemens,


what are the feauters of CObject

4 Answers   Siemens, Wipro,


if no message handler is available for a message then will deal with the message ? does window proving any default mechanism?

2 Answers   Patni,


how u can move CDC pointer to one line in cview?

2 Answers  






Which Macro is a Super set of other two macro DECLARE_SERIAL,DECLARE_DYNAMIC and DECLARE_DYNCREATE. ?

2 Answers   Sony,


What is the difference between the ASSERT and VERIFY macros?

4 Answers  


Does the application have more than one object? If no, then what is the reason?

5 Answers  


Tell us something about MFC?

7 Answers   Microsoft,


What is userdefine Messages in MFC?

1 Answers   HCL,


What is the difference between GetMessage and PeekMessage ?

3 Answers  


how to repaint when working with horizontal scroll bar

0 Answers  


Categories