Click here to Skip to main content
Click here to Skip to main content

Report control - an Outlook 2000 style SuperGrid Report Control

, 14 Jun 2001
Rate this:
Please Sign up or sign in to vote.
An Outlook 98/2000 Style SuperGrid Report Control that tries to overcome some of the weaknesses of other implementations.

Sample Image

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...

Version history excerpt (refer to source file for complete history):

2.0.1	- Fixed bug in DeleteItem for tree control mode.
	- Fixed item expansion for single subitem hierarchy items.
	- Added GetExpandedItemText to allow expanded items to show different
	  text from the subitem text.
	- Added support for radio button and disabled check marks and 
	  radio buttons.
	- Added RVP_ENABLEFLATCHECKMARK property, to control the visual style
	  of check marks or radio buttons.
	- Added support for check mark and radio button image list.
	- Changed CurrentFocus() to GetCurrentFocus().
	- Changed OnKillFocus to recognize all child windows.
	- Extended MeasureItem function.
	- Fixed GetNextItem() for RVTI_ROOT.
	- Added support for SetRedraw suggested by Phil J Pearson.
	- Optimized InsertItem performance by skipping GetRowFromItem
	  when the focus is not on an reorderable row, as suggested by
	  Phil J Pearson.
	- Added disabled background function to CReportSubItemListCtrl.
	- Added pre-create style passing to CReportView.
	- Adjusted edit box position.
	- Fixed a bug related to keydown messages in unfocused state.
	- Fixed tip redraw problem and tip background color mismatch.
	- Fixed kill tip on WM_KILLFOCUS, finally fixing click and double
	  click on expanded subitems.
	- Added GetSelectedItems method.
	- Fixed a selection bug in ClearSelection.
	- Made GetReportCtrlPtr virtual and changed CReportView to use
	  overriden function to get a pointer to the embedded CReportCtrl.
	  This allows control derived from CReportCtrl to be embedded in 
	  CReportView.
	- Added UpdateWindow to SetRedraw when re-enabling redrawing.
	- Removed legacy definitions from header file.
	- Added blended image support through state bits, focus and selection
	  through the RVP_ENABLEIMAGEBLENDING and RVP_BLENDCOLOR properties.
	- Added support for overlay images.
	- Added Win2K tip fading to CReportTipCtrl.
	- Fixed nFormat subitem member update in OnHdnItemChanged, as
	  suggested by Sven Ritter.
	- Added selective item cache flush to SetItemCount.
	- Added GetItemString() function to retrieve an item as a string.
	- Added clipboard Copy support and clipboard separator and indent
	  properties.
	- Fixed OnRvnEndItemEdit to not loose lParam, as suggested by
	  Paul Hurley.
	- Added GetSortSettings() to retrieve sorting settings.
	- Made SelectRows virtual to allow owner data multiple selection
	  management.
	- Fixed a bug in DeleteItem for trees.
	- Fixed various mouse button, keyboard selection/focus issues.
2.0.0	- Made scrolling with left or right cursor key dependent on
	  focus subitems style.
	- Fixed resource leak in empty list, as suggested by Florent
	  Odelain.
	- Fixed ResortItems and DeactivateSubItem bugs as suggested by
	  Rafael Lombardi Santos.
	- Fixed HitTest on reordered columns, reported by Trevor Ash.
	- Fixed item rect returned in hitinfo structure for scrolled
	  controls. This fixes incorrect positioning of tip windows.
	- Added CReportHeaderCtrl to access CFlatHeaderCtrl's protected
	  members.
	- Added first column indent functions, to support hierarchy
	  GUI elements.
	- Fixed HitTest to retrieve correct item data.
	- Added parameter to sort callback.
	- Removed SortAllSubItems, because implementation was not
	  maintained and buggy.
	- Fixed IsItemVisible and added GetTopIndex(), PageUp() and
	  PageDown() as suggested by Alina Kozlovsky.
	- Added tree control features, both in preparation of group
	  view mode as well as a standalone feature.
	- Fixed subitem text drawing following uninitialized subitems.
	- Changed CompareItems callback and functions to support
	  separate subitems to enable tree view and group view sorting.
	- Extended CompareItems to sort on checkboxes as suggested by
	  Peter Lagerhem.
	- Fixed offset of subitem tip for items with images or checks
	  and text and related hittesting issues.
	- Fixed NOHEADER style.
	- Changed selected items and tree boxes in tree view mode visuals
	  to match common control look and feel.
	- Fixed default height setting for font size updates with images.
	- Fixed cosmetic bug with RVS_SHOWHGRID style, as suggested by Matrix.
	- Fixed SelectAll() for empty control as suggested by Dmitry Sazonov.
	- Added GetStyle().
	- Added RVN_HEADERRCLICK to support popup menus on header.
	- Fixed tooltip double click and ALT key relay events by removing
	  mouse capture.

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.

A list of licenses authors might use can be found here

About the Author

Maarten Hoeben
Web Developer
Netherlands Netherlands
No Biography provided

Comments and Discussions

 
QuestionTree Sub Items PinmemberC_BRUMLEY5-Nov-08 7:01 
QuestionSupport virtual list? Pinmemberxnetec13-Oct-08 23:54 
GeneralATGrid Report Control Pinmemberetcell30-Jul-07 18:45 
GeneralI can not expand the tree root Pinmembersms918-Jul-07 23:38 
QuestionSet the last double clicked item's backcolor with RVS_TREEVIEW style? Pinmembersms915-Jul-07 22:52 
GeneralIssues with using the control on a non-primary display Pinmembertbaynon3-May-07 9:15 
GeneralError in CReportCtrl::DrawCheck() member Pinmemberpedroo23-Jan-07 11:18 
GeneralProblem to integrate into MDI application Pinmemberpedroo20-Jan-07 3:11 
GeneralRe: Problem to integrate into MDI application Pinmemberpedroo21-Jan-07 7:12 
QuestionProblems with OnToolTipNotify when in Unicode Pinmember_Stilgar_1-Apr-06 10:43 
GeneralRe: Problems with OnToolTipNotify when in Unicode PinmemberTim Wessman1-Jun-06 1:34 
AnswerRe: Problems with OnToolTipNotify when in Unicode PinmemberTim Wessman1-Jun-06 2:25 
QuestionIs there control that supports groupping? Pinmemberkostia11-Aug-04 4:15 
AnswerRe: Is there control that supports groupping? Pinmember_Stilgar_15-Apr-06 21:26 
GeneralCompilier VC7 Pinmemberlurchibaer22-Jun-04 22:38 
GeneralRe: Compilier VC7 PinmemberSiegmund Frenzel15-Jul-04 1:21 
GeneralProblems with WinNT 4 PinmemberFiSt5-Apr-04 2:06 
GeneralRe: Problems with WinNT 4 Pinmemberpgrohs5-Apr-04 6:48 
GeneralSolution for problems with selecting rows Pinmemberpgrohs1-Apr-04 23:49 
GeneralBugfix in OnKeyDown handler PinmemberFrank Kobs19-Mar-04 4:15 
GeneralTreelines implementation PinmemberFrank Kobs18-Mar-04 6:22 
GeneralRe: Treelines implementation Pinmembernba10-Oct-07 22:41 
GeneralRe: Treelines implementation PinmemberFrank Kobs10-Oct-07 23:20 
GeneralUsing a dialog in the preview PinsussAnonymous11-Feb-04 23:04 
GeneralHad to mod this one down PinmemberAAntix15-Jan-04 4:56 
GeneralResizing misbehavior Pinmemberhanryz11-Dec-03 22:10 
GeneralUsing this with Splitters PinmemberDan Scannell19-Oct-03 21:49 
GeneralRe: Using this with Splitters PinmemberDan Scannell21-Oct-03 10:37 
GeneralRe: Using this with Splitters PinmemberDan Scannell23-Oct-03 7:34 
GeneralCompiling in VC7.1.3088 PinmemberNickle1-Oct-03 4:05 
GeneralRe: Compiling in VC7.1.3088 Pinmembersteblublu29-Apr-04 9:51 
GeneralChanging selection Pinmemberjohny_cz28-Sep-03 0:51 
Generalmultiline... Pinmemberstewe29-Aug-03 1:34 
QuestionHow can I Drag Drop With this control PinmemberYadvinder31-Jul-03 2:55 
AnswerRe: How can I Drag Drop With this control PinsussVANNAM28-Jul-04 16:15 
GeneralOwner draw style PinmemberAfneu26-Jul-03 21:40 
GeneralSetSelection problem PinmemberJon Sagara9-Jul-03 15:04 
QuestionSubclassing the CReportHeaderCtrl? PinsussMartijn8-Jul-03 3:15 
GeneralI have change it to OCX,but have some problem in it Pinmembermaohj16886-Jul-03 17:23 
GeneralRe: I have change it to OCX,but have some problem in it Pinmember__Greek7-Jul-03 9:42 
GeneralRe: I have change it to OCX,but have some problem in it PinmemberKurt Barlar15-Jul-03 5:39 
GeneralBizarre Behavior PinmemberJon Sagara2-Jul-03 20:20 
GeneralPersisting the report control's sort settings PinmemberJon Sagara2-Jul-03 19:39 
GeneralSimiliar comercial product PinsussVerifier24-Jun-03 2:55 
GeneralRe: Similiar comercial product PinmemberJon Sagara24-Jun-03 10:31 
GeneralGroup By Field PinmemberS Ganapathi Raman13-Jun-03 18:22 
QuestionUpdate? PinmemberJon Sagara13-May-03 21:43 
GeneralCompiling with VC7 will not work PinmemberAgha khan23-Apr-03 21:31 
GeneralRe: Compiling with VC7 will not work PinmemberSiegmund Frenzel14-Sep-03 21:20 
GeneralSize of the control in a view PinsussVerifier10-Apr-03 5:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 15 Jun 2001
Article Copyright 2000 by Maarten Hoeben
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid