Solved

ListBox

Posted on 2000-02-18
4
273 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 50 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

Technology Partners: 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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

734 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