ActiveX CListCtrl |
| Sandeep Thammadi posted at 04-Jul-08 02:00 |
Hi All,
I have an activex control subclassed from SysListView32. I wanted it to appear and work like th property grid the we see in VS 2003/2005. I was able to get the look right. The problem is even thoug I added items using ListView_InsertItem, these items are not visible on the list control.
In PreCreateWindow, I am setting the style like this: cs.style |= LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_OWNERDRAWFIXED;
In OnCreate, I am adding the columns and a single item like this: ListView_InsertColumn(m_hWnd, 0, "Empty"); ListView_InsertColumn(m_hWnd, 1, "Property Name"); ListView_InsertColumn(m_hWnd, 2, "Property Value");
LVITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM; lvItem.iItem = 0; lvItem.pszText = ""; ListView_InsertItem(m_hWnd, &lvItem); ListView_SetItemText(m_hWnd, 0, 1, "Properties")
I also used OnCustomDraw, OnEraseBkgnd & MeasureItem methods to achive my look and feel.
Please help !
|
|