troubleshooting Question

MFC: CListCtrl derived class tutorial problem

Avatar of sternocera
sternocera asked on
System ProgrammingMicrosoft DevelopmentEditors IDEs
31 Comments1 Solution4933 ViewsLast Modified:
Hello,

I'm following this tutorial for MFC/C++: http://www.codeproject.com/listctrl/creportctrl.asp . This concerns implementing a CListCtrl-derived class with certain "out of the box" functionality that the MFC "report style" CListCtrl lacks. For example, the user can re-order items by clicking on a column header, and, optionally, the programmer can include a checkbox beside nodes.

I created a dialog that uses this CReporCtrl, but that didn't work -  I could see entries, but there were no headings, and no lines, even though I'd called the SetGridLines() member function.

I then called ModifyStyle(0,LVS_REPORT), which is meant to be used with the CListCtrl base class. Now, CReportCtrl was mostly fully functional. The column headers were visible. When I called SetGridLines(TRUE), gridlines appeared. However, one last important piece of functionality was still missing: I couldn't re-order column entries by clicking on a column header, in the style of windows explorer.

I'd be very greatly if someone could point me in the right direction,

Thanks a lot,
Sternocera
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 31 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 31 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros