Creating a Logbook
Posted
by Mike Marquet
on June 9th, 2003
Environment: VC++
Introduction
The CLogbook class is a class for implementing a logbook in an MFC application. Here's an architecture of the logbook class.

Click here for a larger image.
Using the CLogbook Class
- Declare a LOGBOOK_INIT_INFOS structure and initialize it with the InitInfos function.
- Declare a LOGBOOK_INIT_FILE_INFOS structure and initialize it with the InitInfos function (only if you want to use a file logbook).
- Declare a LOGBOOK_INIT_GUI_INFOS structure and initialize it with the InitInfos function (only if you want to use a GUI logbook).
- Call the Initialize function:
- File parameter can be NULL if no file logbook needed.
- GUI parameter can be NULL if no GUI logbook needed.
- Call AttachFile function to attach a file logbook to base class.
- Call AttachGUI function to attach a file logbook to base class.
Downloads
Download demo project - 165 Kb (source must also be downloaded)Download source code - 81 Kb

Comments
Fields disabling
Posted by Legacy on 09/03/2003 12:00amOriginally posted by: Pkun
Good control. It is what i need.
Can i disable date/time and text type fields? If i set an empty string to date/time format I see a tabulation in GUI component and date/time (in default format) in log file. If I set an empty string to personal text type I see a tabulation in GUI.
ReplyI don't need these fields now. Can I disable them at all (no tabulation in GUI and in log file)?
dinamic Adding
Posted by Legacy on 07/14/2003 12:00amOriginally posted by: allie
If this can add the information according to the other operation,sunch as file encypt,it will be better.
Replyprinting
Posted by Legacy on 06/11/2003 12:00amOriginally posted by: Walter Reiser
A fine piece of code, but to be able to print the logbook would improve it a lot ( I know this can be troublesome to code )
ReplyWith regards