Solved

Is a control a comboBox ?

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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 42
Tab names are off by one 5 54
mapBully challenge 6 134
Problem to event 3 96
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: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 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