Solved

ListBox

Posted on 2000-02-18
4
267 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 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
ahh, CCheckListBox, that'll be what you want then :)
0
 
LVL 30

Expert Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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: 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…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now