Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ListBox

Posted on 2000-02-18
4
Medium Priority
?
281 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
  • 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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…
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…
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.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

824 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