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 many types of messages are their

4 Answers   E Logic, TCS,


1)How to load an icon on a button as Dynamically ?

1 Answers   HCL,


Hi All, I have created one MFC Dialog Based application.now if i am running the application its working fine,instead of closing he application i minimized the application,if i run the application again,i am getting the Dialog. I want to prevent the calling of application multiple times. please give me the code and let me know in which method i need to make changes. Praveer

7 Answers   HP,


How to access document object from view ?

1 Answers  


Tell me about different kinds of synchranization objects ?

6 Answers  


What is primitive and non-primitive application?

2 Answers   HCL,


what if we provide two message handler for same message ?

1 Answers  


is it possible to display a window .without using windowclass

1 Answers   E Logic,


How to update windows title bar dynamically?

7 Answers   HCL,


how many types of classes are ther,what are that

7 Answers   L&T,


1.Get string1,string2,string3 1.add string1 and 2,string1 and 3. 2.replace vowels with T 3.count number of T. 4.remove T 5.COPY string1 to stringf. 6.restore string1. print the following 1.Number of T 2.StringF 3.string1+string2+string3 Use pointers and functions

1 Answers  


Differ GetMessage, PostMessage & PeakMessage?

4 Answers   Symphony,


Categories