Creating a Logbook

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.

Using the CLogbook Class

  1. Declare a LOGBOOK_INIT_INFOS structure and initialize it with the InitInfos function.
  2. Declare a LOGBOOK_INIT_FILE_INFOS structure and initialize it with the InitInfos function (only if you want to use a file logbook).
  3. Declare a LOGBOOK_INIT_GUI_INFOS structure and initialize it with the InitInfos function (only if you want to use a GUI logbook).
  4. Call the Initialize function:
    • File parameter can be NULL if no file logbook needed.
    • GUI parameter can be NULL if no GUI logbook needed.
  5. Call AttachFile function to attach a file logbook to base class.
  6. 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

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read