clistctrl

How to edit columns in-place with CListCtrl?

I want to have CListCtrl.EditLabel() for any column of the list. How can I implement such a feature? ...

MFC - How can I disable a list item?

I have a CListCtrl with checkboxes. I want to be able to disable one of the items so that the user cannot click the checkbox. Is this possible? If so, how? Edit: Found the specifics on how to hide a checkbox in another question http://stackoverflow.com/questions/190667 ...

How to add data Filtering using CListCtrl and CHeaderCtrl

Background: Applications that manipulate a collection of data typically present using a grid containing a header. These same applications typically incorporate a filter to allow the user to narrow the data set (Excel is a wonderful example. There are many others). In my MFC application, I'm attempting to do the same using the CListCtr...

Clistctrl item text color

How do you change the text color of a Clistctrl item (report view)? ...

click or select Clistctrl subitem (report view)

How can I determine a selected or clicked sub item of a report view Clistctrl? ...

Cannot edit labels in a CListCtrl

I'm building a project with MFC Feature Pack. Is this project I have a window which includes a CView, which includes a CListCtrl-derived object. The object includes the LVS_EDITLABELS flag. Somehow I cannot edit the CListCtrl icon labels by two-time clicking (not double-clicking) on the icon label. After I select the item with a single ...

CListControl selection (MFC)

Hi, In report view in a CListCtrl in MFC, how do I detect if there is no current highlighted selection? Using GetFirstSelectedItemPosition doesn't work because if an item was previously selected and then clicked somewhere else on the list control, GetFirstSelectedItemPosition still reports the last position selected instead of NULL, h...

How to (fast) fill a CListCtrl in C++ (MFC) ?

Hello in my application I have a few CListCtrl tables. I fill/refresh them with data from an array with a for-loop. Inside the loop I have to make some adjustments on how I display the values so data binding in any way is not possible at all. The real problem is the time it takes to fill the table since it is redrawn row by row. If I t...

how to handle properties key in CListCtrl?

I want to handle the properties key press in CListCtrl in MFC and show a context menu which is already shown with right clicking. How can I do that? ...

Catching a WM_NOTIFY message from a custom ListCtrl

My application is c++, and is a combination of MFC and ATL. The part I'm working with here is MFC. I have a custom list control class in one of my dialogs which inherits from CListCtrl. I'm trying to add a handler for the LVN_ITEMCHANGED message so I can update the rest of the dialog form, which is dependant on the contents of the list...

CListCtrl WM_TIMER event ids 42 and 43?

I have a CListCtrl derived class that provides subitem editing by creating a CEdit starting at the correct offset of the subitem. Sometimes the subitem is only partially visible so I scroll the CListCtrl to the offset location to gain more space for the CEdit. Now something very weird happens: On Windows Vista and Windows 7 the CListCtr...

How to display different size images in CListCtrl

In my MFC program,I want to display different size images in a list! I use CListCtrl and CImageList! But the CImageList only can load fixed images! ...

Problem with HDN_ENDTRACK when resizing a list column

Hello Stack Overflow. I am having a bit of a problem when handling a HDN_ENDTRACKW message for a custom class which derives from CListCtrl . Essentially, it seem that when this message is sent, the actual value which stores the width of the column is not updated until after my handling code has been executed. The code inside the handl...

How to catch a scroll event in a CListCtrl? MFC C++

I subclassed CListCtrl into my own class, and I use it in several dialogs and views. What I want to do is execute some code when the ClistCtrl is being scrolled vertically. I need this to be in the CListCtrl subclass itself. I can detect the scrolling triggered when interacting with the scrollbar with the method provided by demoncodemon...

How to avoid CListCtrl items to be partially visible?

I have a resizeable CListCtrl and I want to avoid any item being displayed partially, ever. For example: I want Item 9 to not be displayed in this case. Is there a flag or method for this? How would you go about solving this issue? I tried the following and it was no good: void CMyCListCtrl::OnEndScrolling() { int iCount = this...

How to detect a CListCtrl selection change?

I want to execute some code when the user selects a row in a CListCtrl (report view, I don't care about the other viewing modes). How do I catch this event? is there some message I can map or a method like "OnSelectionChanged" or something like that? ...

CListCtrl get item index

How do I get an item's index number using the caption text? I'm using CListCtrl class of MFC. I have the item's caption text, can I get the index for that item and then update its text. It will be helpful if you could provide an example. ...

How do I un-highlight a previously selected line in an MFC CListCtrl programmatically (VS 6)?

Does anyone know how to un-highlight a previously selected line in an MFC CListCtrl programmatically ? ...

MFC List Control

In MFC, I can edit the text of items in the list control but only for the first column by setting the Edit Labels to true. Now when I click the first column item to change its text, I'm able to change its text but when I hit Enter, its text isn't updated, why and how do I edit text for other columns? ...

Intercepting messages from a child of a child with MFC

I have a CListCtrl class and at the moment when a user selects one of the sub items I am displaying a CComboBox over the subitem which the user can then make a selection from. However I have a problem. When the user has made a selection i need the combo box to disappear (ie intercept CBN_SELCHANGE). The problem is that I need to make ...