Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How Can I insert buttons inside my list?
code of my derived class:

#include "stdafx.h"
//#include "ModalitaNotturna.h"
#include "ListBut.h"


// CListBut

IMPLEMENT_DYNAMIC(CListBut, CListCtrl)

CListBut::CListBut()
{

}

CListBut::~CListBut()
{
}


BEGIN_MESSAGE_MAP(CListBut, CListCtrl)
END_MESSAGE_MAP()


void CListBut::SetButton()
{





}
// CListBut message handlers


What I have tried:

I tried with a derived class but I don't know how I can continue with my code
Posted
Updated 15-Jul-22 4:28am
v2
Comments
Richard MacCutchan 15-Jul-22 8:56am    
Without more information it is impossible to suggest what you may be doing wrong. Please use the Improve question link above, and add complete details of what is not working.
Member 14594285 15-Jul-22 9:56am    
I improved my question

1 solution

Here are two articles that describe things similar to what you are asking : https://www.codeproject.com/Articles/5709/Customized-Report-List-Control-With-In-Place-Combo[^]
https://www.codeproject.com/Articles/1796/XListCtrl-A-custom-draw-list-control-with-subitem[^]

They don't place a button in the ListCtrl but they place other controls in one and the technique is similar for a button.
 
Share this answer
 
Comments
merano99 15-Jul-22 16:17pm    
The XListCtrl seems not to be compatible to newer VS-Versions. Even after the usual adjustments, I couldn't get it to work. It comes with a lot of dependencies that looks like a lot of effort.
Rick York 15-Jul-22 21:57pm    
I got it to compile with VS19 but I don't recall actually using it anywhere. The one I always use is a modified version of CReportCtrl by Bin Liu. I changed it to derive from CMFCListCtrl and a custom class by me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900