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

I have 2 threads. One thread prints odd numbers and the second thread prints even numbers. Now, I have to execute the threads alternatively so that i can output 1,2,3,4,5,6,..... write code for this?

1 Answers  


What is the difference between regular dlls and extended dlls?

2 Answers  


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

1 Answers   HCL,


How many types of combo box are their

2 Answers   Aaditya Info Solutions, E Logic,


What is the difference between ASSERT and VERIFY?

2 Answers  






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

5 Answers  


Differ GetMessage, PostMessage & PeakMessage?

4 Answers   Symphony,


Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A. Explain how a pointer to function can be declared in C++? B. List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header ("Include") Files.

3 Answers   ABC, HCL, Infosys,


1) How do you Destroy a Dialog Box ?

2 Answers   Honeywell,


What is the use of OninitDialog ?

11 Answers   HCL, Nagarro,


What is socket?

3 Answers  


What is the size of class

18 Answers   Aircom,


Categories