Report Object
Ever wanted to list information in your applications?
It is possible because windows has two standard controls for that; listbox
and listview! Ever wanted to edit values in those lists? It is possible to
edit only the first value with a listview...
Report Object -
The Solution!
The Report Object is a custom control that can
be inserted in any dialog box in any C/C++ or pointer oriented language
program. With this object, any cell in a report can be edited.
The Report Object is implemented both as a
dynamic and a static library. When using the dynamic library, all you have
to do is to load the library with the LoadLibrary Win32 API function and
then call CreateWindow with the class name of the Report Object!
When using the static library, the function
InitiateRptObj must be called to initialize the Report Object. The
advantage with using the static library is that your application will
consist of only one file.
The cells in the object can have different
format settings which can be designed graphically with the design tool
RptDesign.exe. The formats of a report can be saved in a file that can be
imported as a resource in your application. The resource can then be
loaded into the Report Object. The reports can also contains
bitmaps!
The Report Object is a normal window that
receives messages as any standard control. It notifies its parent when
events happens to it. All messages are defined in RptWin.h.
The report object can also be inserted in
dialog boxes as Custom controls. Be sure to load the library or call the
initialization function before displaying the dialog box.
The sample shows a simple implementation of
the Report Object. The look and feel of the report is almost identically
with Excel! Since the design of the report has been made with
RptDesign.exe and imported as a resource, the code of the sample is very
small!
The sample also shows a way to handle
notification by the Report Object to update calculated values just as
Excel does.