Firstly I've managed to put together a mockup image of what I'm after, it's attached and what I have with code so far is below.
I'm not particlurly fluent in C++ but a fast learner. The following is what I am attempting to achieve:
1. I'm trying to create this multiple column List with checkboxes in the second column of the items.
2. Where the second column heading is I'd like to place a image instead of text.
3. How to check these boxes.
4. How to disable the boxes.
Any help is greatly appreciated!
Hayden
m_myListControl.InsertColumn(1,"Layer",LVCFMT_LEFT,50);
//******Somehow here insert column heading with image *******
//m_myListControl.InsertColumn(2,??An image??LVCFMT_LEFT,50);
//**********************************************
m_myListControl.InsertColumn(3,"Zoom",LVCFMT_LEFT,50);
m_myListControl.InsertColumn(4,"Labels",LVCFMT_LEFT,50);
m_myListControl.SetColumnWidth(0,200);
m_myListControl.SetColumnWidth(1,20);
m_myListControl.SetColumnWidth(2,100);
m_myListControl.SetColumnWidth(3,100);
CString strText;
// Insert 10 items in the list view control.
for (int i=0;i < 10;i++)
{
m_myListControl.InsertItem(LVIF_TEXT|LVIF_STATE, i, "Layer Title", 0, 0, 0, 0);
//*******here somehow add a checkbox on the second column******
m_myListControl.SetItemText(i, 1, "CHECKBOX");
//*******************************************************
m_myListControl.SetItemText(i, 2, "'WS Point: '+AssetType");
m_myListControl.SetItemText(i, 3, "(0, 10000)");
//*******On the 5th item check checkbox and disable it******
if (i = 4)
{
//I know this isn't right but hopefully you'll see what mean
m_myListControl.SetCheck(2,1);
m_myListControl.SetDisabled(2,1);
}
}
Last edited by ill_comms; March 16th, 2009 at 09:48 AM.
thanks, I'll check out all your suggestions in a second.
thought I might just throw this one into the mix. Coming up soon I have a similar little project which requires multiple checkboxes in multiple columns, does anyone have anyone ideas on how something like this could be accomplished.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.