boostSharedPtr passed through code, logic for 5 dialog boxes