?
Solved

Is a control a comboBox ?

Posted on 2000-04-07
2
Medium Priority
?
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 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