Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ListBox

Posted on 2000-02-18
4
Medium Priority
?
278 Views
Last Modified: 2013-11-20
I am beginner in MFC. How can I place to my form ListBox with checks?

0
Comment
Question by:Elery
[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
4 Comments
 
LVL 1

Accepted Solution

by:
mahno earned 200 total points
ID: 2534910
U must place to Ur form List control and add variable(right mouse button click->Class Wizard->Member variables->Add variable)

m_List
control
CListBox

Then in .h file change code:

  CListBox m_List;

to

  CCheckListBox m_List;

Enjoy

brgs,
  mahno
0
 
LVL 1

Expert Comment

by:ScottyDawg
ID: 2534918
As far as I know, there is no listbox style that will add checkboxes.

However, there if you use a ListCtrl you can add checkboxes to it with LVS_EX_CHECKBOXES style.

To add the style call SetExtendedStyle() on the listctrl.
0
 
LVL 1

Expert Comment

by:ScottyDawg
ID: 2534928
ahh, CCheckListBox, that'll be what you want then :)
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2534971
In resource editor you'll have to set 'owner draw fixed' and 'Has Strings' styles...
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

730 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