Solved

Is a control a comboBox ?

Posted on 2000-04-07
2
247 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 20 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

Independent Software Vendors: 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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

707 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