What function is used to retrieve the currently selected
index in a list box?
Answers were Sorted based on User's Feedback
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 is #progma and where it is used?
What is the initial function to be called in MFC and what it will do
If application hangs while SendMessage is waiting for the result, how you handle it?
What is the size of class
How to setup a timer?
What?s the difference between Modal and Modeless Dialog?
what is the updated verssion in vc++
Which CPrintInfo member variable must be set for multiple page printouts?
1) Enable or disable a Cancel button at run time?
How to update windows title bar dynamically?
1) How do you Destroy a Dialog Box ?
How can update edit control data of an executing application from other application?