You have the whole expressiveness of C++ at hand, including inheritance. Have a base class defining the logic of the application and two subclasses providing two version of the user interface. Then you will be able to decide which UI to show by instantiating one or the other.
Bookmarks