?
Solved

Is a control a comboBox ?

Posted on 2000-04-07
2
Medium Priority
?
252 Views
Last Modified: 2013-11-20
Hello,

I learned to use ::GetClassName(...) API function to get the class name
for the active control.

Unfortunately, It retrieves the same class name for Edit controls and comboBoxes.

How can I distinguish between the two ?
Any API / MFC solution will be great.

Yair
 
0
Comment
Question by:yairy
2 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 80 total points
ID: 2692951
Hi yairy,

If the classname is 'Edit' you should check classname of control's parent. If this is 'ComboBox' then it's a combo box. There are three different types of comboboxes:

- SIMPLE: a 'Edit' control and a 'ComboBox' control as sibling childs of a 'ComboBox' control

- DROPLIST: one single 'ComboBox' control.

- DROPDOWN: a single 'Edit' control as child of a 'ComboBox' control

hope that helps,

ZOPPO
0
 
LVL 2

Author Comment

by:yairy
ID: 2710214
Sorry about the delay, I wasn't notified
there is an answer.

I'll get to you after checking.

Yair
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month17 days, 6 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question