CCheckListBox Control - Programmer

This is a discussion on CCheckListBox Control - Programmer ; Hi, I'm hoping that someone here can help. I'm trying to create a control in a dialog box which I want to be a list box with several check boxes for every entry in the list. Now I can create ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: CCheckListBox Control

  1. CCheckListBox Control

    Hi, I'm hoping that someone here can help.

    I'm trying to create a control in a dialog box which I want to
    be a list box with several check boxes for every entry in the list.

    Now I can create check boxes and list boxes by clicking on the appropriate
    button in Visual Studio's Control Box menu but it doesn't have a checklistbox
    control in the menu. I've tried a lot of things but it seems rather odd to
    me that there'd be a class, namely CCheckListBox, able to support a control
    but no way to actually put the control in a dialog box.

    Does anyone have any idea how to do this?

  2. Re: CCheckListBox Control

    Put a Listbox on your dialog, then in the ClassWizard, add a Member Variable
    of type CCheckListBox to your listbox. IIRC, the properties on the
    listbox have to be Owner-Draw: Fixed, and Has Strings (best to check with
    MSDN on this)

    Alternately, you have to Subclass the listbox yourself in the InitDialog().

    --
    -------------------------------------------------------------------------
    Free software - Baxter Codeworks www.baxcode.com
    -------------------------------------------------------------------------


    "Me" wrote in message
    news:200307161005.h6GA53lL013181@mail4.andrew.cmu. edu...
    > Hi, I'm hoping that someone here can help.
    >
    > I'm trying to create a control in a dialog box which I want to
    > be a list box with several check boxes for every entry in the list.
    >
    > Now I can create check boxes and list boxes by clicking on the appropriate
    > button in Visual Studio's Control Box menu but it doesn't have a

    checklistbox
    > control in the menu. I've tried a lot of things but it seems rather odd

    to
    > me that there'd be a class, namely CCheckListBox, able to support a

    control
    > but no way to actually put the control in a dialog box.
    >
    > Does anyone have any idea how to do this?




+ Reply to Thread