Click here to Skip to main content
15,868,069 members
Articles / Programming Languages / C++

BasicAdmin2 - Personal Finance Software

Rate me:
Please Sign up or sign in to vote.
4.58/5 (8 votes)
4 Nov 2011CPOL3 min read 38.7K   5.9K   32   7
Utility to keep track of your finances
Imagen

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Argentina Argentina
System developer from Argentina.

Programmed in VB 5,6,.NET, C#, Java, PL-SQL, Transac-SQL, C, C++ and even some "calculator" language.

Love to build small, useful applications.
Usually building big and complicated apps based on solid, reliable components.

Hobbies: reading, photography, chess, paddle, running.

Comments and Discussions

 
GeneralCongratulation Pin
WLRoger29-Jul-14 8:00
WLRoger29-Jul-14 8:00 
GeneralRe: Congratulation Pin
ErnestoNet31-Jul-14 6:36
ErnestoNet31-Jul-14 6:36 
QuestionMy vote of 5 Pin
gabegabe15-Sep-13 5:52
gabegabe15-Sep-13 5:52 
AnswerRe: My vote of 5 Pin
ErnestoNet16-Sep-13 15:47
ErnestoNet16-Sep-13 15:47 
GeneralRe: My vote of 5 Pin
gabegabe16-Sep-13 17:06
gabegabe16-Sep-13 17:06 
BugIt will crash under win7 Pin
Member 29769368-Jun-12 8:02
Member 29769368-Jun-12 8:02 
Thank you for your nice work.
I downloaded the exe files and source code.

I run X86 version under win7, however, BasicAdmin2 crashed.

I compiled source code with debug ,release and win32 ,x64 configures. I succeeded in all the compilations. But none of them could run normally.

The crash lies in statement

ADDFIELD("ID", TFTypeInteger, TRUE)

within function

void CreateDb::CreateAccounts(CDataStructure* ds)

within CreateDb.cpp file.

I found the the following code in <vector> file.

///////////////////////////////////////////////////code
void push_back(const _Ty& _Val)
{ // insert element at end
if (_Inside(_STD addressof(_Val)))
{ // push back an element
size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
if (this->_Mylast == this->_Myend)
_Reserve(1);
_Orphan_range(this->_Mylast, this->_Mylast);
_Cons_val(this->_Alval,
this->_Mylast,
this->_Myfirst[_Idx]);
++this->_Mylast;
}
else
{ // push back a non-element
if (this->_Mylast == this->_Myend)
_Reserve(1);
_Orphan_range(this->_Mylast, this->_Mylast);
_Cons_val(this->_Alval,
this->_Mylast,
_Val);
++this->_Mylast;
}
}
////////////////////////////////////////////

when running into the statement:

if (this->_Mylast == this->_Myend)

I found this->_Mylast is 0x00000000c, maybe it is the reason.

However, I donn't know how to correct.

So, what do you think about this issue.

Thank you for your nice work again.
GeneralRe: It will crash under win7 Pin
ErnestoNet12-Jun-12 7:28
ErnestoNet12-Jun-12 7:28 

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

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