Introduction

This ReportCtrl control is an Outlook 98/2000 style SuperGrid control. I've
seen many implementations, most of them based on the standard
CListCtrl. All implementations have their specific weaknesses. This
implementation tries to overcome some of the weaknesses, although for some
purposes it may introduce others.

The documentation is sparse, because I do not have much time to write
documentation. However, the included demo is a great help in understanding how
to use the features of the control and many features are demonstrated in a
practical manner. The interfaces of the controls highly resemble the interfaces
of similiar MFC controls, like the list control and header control. So, for the
more experienced MFC coder, it should not be a big problem to understand how to
use the control in their own projects...

Version History Excerpt (refer to source file for complete history)

This ReportCtrl control is an Outlook 98/2000 style SuperGrid control. I've
seen many implementations, most of them based on the standard CListCtrl. All
implementations have their specific weaknesses. This implementation tries to
overcome some of the weaknesses, although for some purposes it may introduce
others.

The documentation is sparse, because I do not have much time to write
documentation. However, the included demo is a great help in understanding how
to use the features of the control and many features are demonstrated in a
practical manner. The interfaces of the controls highly resemble the interfaces
of similiar MFC controls, like the list control and header control. So, for the
more experienced MFC coder, it should not be a big problem to understand how to
use the control in their own projects...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

If using this control on a system with multiple displays, you will find problems adding items from the field chooser if the window is on a monitor with negative coordinates (i.e. to the left or above the primary display).

This is due to how it sends the coordinates to the header control allowing for the drawing of the red placement arrows, dropping the column in, etc.

MAKELONG returns a long obviously. However the params being passed to the macro are both longs. MAKELONG needs shorts to work properly. If not fixed, the headercontrol will receive the message and not get correct values for negative coordinates when doing HIWORD and LOWORD.

Make the following changes in CReportSubItemListCtrl::Dragging(CPoint pt)

I'd like to use CReportView instead of CListView which creates VS2003 in MDI app wizard with chosen "windows explorer" window style. Some problem is here with redrawing CReportCtrl content. I simple paste content of ReportCrtlDemo OnInitialUpdate() into the same member in MDI app's view class. After code executes this, in wiew nothing displays, till I click on non-visible header. Then control header stay visible, when I try drag - it's possible, but background does not redraws, there is only redrawing field like it is dragged. Probably is needed to add some message handler for redrawing report control ? What to do with it ?

Problem with redrawing backgroung is solved, but still here is some problem with activating control.After content is drawed I must to call rc.PostMessage(WM_ACTIVATE, 2, 0) and rc.PostMessage(WM_ACTIVATETOPLEVEL, 2, 0).Both I investigate with spy++ with demo application.What I dod wrong ? IMHO it should not need to send these messages.

pToolTip->SendMessage(TTM_ADDTOOL, 0, (LPARAM)&ti) returns FALSE, but this happens only if compiled in UNICODE mode (which I would like to use). In ASCII mode it works fine and TTN_NEEDTEXT message is sent back to the grid control like it should. In UNICODE build the TTN_NEEDTEXT message never come.