• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

ListBox

I am beginner in MFC. How can I place to my form ListBox with checks?

0
Elery
Asked:
Elery
  • 2
1 Solution
 
mahnoCommented:
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
 
ScottyDawgCommented:
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
 
ScottyDawgCommented:
ahh, CCheckListBox, that'll be what you want then :)
0
 
ZoppoCommented:
In resource editor you'll have to set 'owner draw fixed' and 'Has Strings' styles...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now