Introduction
This is a utility to keep track of personal finances. You can also load your contacts and notes. I used a previous version BasicAdmin1.
The Structure
The program mainly accesses functionality using libraries (DLLs). There are two types of them, the ones that change often and the ones that don't.
The ones that don't change often are grouped in a separate project (BasicAdmin2_Librerias
) and liked as libs:
- SQLiteBase: Contains all SQLite code and CppSQLite3 with some changes to more easily add and edit rows in tables.
- CryptoLib: Contains all Crypto++ code.
- GraphParser: Contains graphic MFC controls (most of them from CodeProject) including:
- MFC Grid
- AMS Edit
- Button ST
- ColorCtrl
- ChartCtrl
The ones that do change often can be grouped in two types:
- By functionality: They contain functionality across all modules.
- BasicAdmin2_Database: It includes migration, database creation, cursors and classes to add, edit, delete and get information from databases.
- BasicAdmin2_Model: It includes classes to manage information and logic.
- BasicAdmin2_Utils: It includes general utility classes including handles, global parameters, general views and dialogs (to inherit from).
- BasicAdmin2_Web: It includes security and web access.
- By modules: They have the views and implementation. They would be the view part in an MVC. Each one corresponds to a single tab of the ribbon.
- BasicAdmin2_Config: Contains the screen to config fonts.
- BasicAdmin2_Contacts: Contains the screens of contacts and contact groups.
- BasicAdmin2_GraphFinance: Contains the screens of accounts, daily input, stats, currencies and values.
- BasicAdmin2_Notes: Contains the screens of notes and note groups.
The Views
When you click a button of the ribbon, it launches a child frame (CMDIChildWndEx
) that can contain up to four views (all in BasicAdmin2_Utils
):
- CGenGridView: It contains the grid, the buttons to add, edit, delete and print, and the filter. It uses a helper to manage controls (
CGenGridControlsMan
). It calls an object of type CGenGridManager
which is mostly virtual so that inheriting from it can implement different grids. It also uses an object of type CGenFilterView
of which you can inherit.
- GenDialogView: It contains the dialog to add or edit rows. It calls an object of type
GenDialogManager
which is mostly virtual so that inheriting from it can implement different dialogs.
- GenTreeDialogView: It is a dialog that contains a tree to select "tree type" data from dialogs and filters. It can be customized using an object of type
ClsTreeOptions
.
- GenLeftTreeView: Used with a splitter and
CGenGridView
. It allows a screen where the user can select an item by both, the tree or the grid. It also has an object of type ClsTreeOptions
.
Parameters, Helpers and Messages
The object of type CParameters
contains:
- Handles to databases.
- Arrays: Most information about groups, constants that is accessed a lot is loaded in an object of type
ClsArrays
.
- Language information: All the text corresponding to the selected language. Each text can be queried from three parameters.
- Font information: Fonts for dialogs, grids, ribbon, buttons and trees.
- Settings: Include number and date configuration, formatting, app look and application path.
There are three classes for control creation, positioning and font: CDialogHelper
, CFontHelper
and CPosHelper
.
Each screen can communicate with the others via registered messages which are defined in CustMessages.h (BasicAdmin2_Model
), so that as you enter data, the stats tab refreshes, etc.
Features
- Ribbon UI
- Modeless dialogs that allow to use the program while adding or editing rows
- Dynamic creation of controls
- Multiple views of the same screen
- Notifications between screens so that when you add an item, a stat is updated
- Font name and size change
- Modeless print preview
- Shortcuts for loading items
- Bar chart
Compiling and Running
To compile BasicAdmin2
, you need to compile the libraries (project BasicAdmin2_Librerias
) with the corresponding settings and copy the .lib and .dll files to the correct folder of BasicAdmin2/Librerias. The program uses VC++ 2010 sp1 runtime to run.
The Program
If someone is using this program, please let me know. I'll keep improving it but I usually don't post updates if it is not popular. I posted this version because it uses a lot of components from CodeProject and because it can be useful for people still using MFC. Besides, it explores interesting UI ideas.
Other personal finance programs include Money Manager Ex and Gnucash, but remember that they are GPL.