bgslibrary mfc app code