Two types of dynamic control bars

Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

When you allocate a new dynamic control bar using the CExtDynamicBarSite::BarAlloc() method, you need to tell the dynamic bar site which control bar exactly you want to create (the bPersistentBar parameter). Prof-UIS provides two types of dynamic control bars: simple dynamic control bars and persistent dynamic control bars. The need for such a division only makes sense if you need to serialize your dynamic control bars more than once during the application instance's lifetime. For example, you have an application whose instance serves for many users and each user gets its own restored GUI state (the layout of control bars, their visibility, and etc.) when they log in in turn (without the necessity to restart the application). Below is described what's going on in each case.

Simple dynamic control bars (bPersistentBar==false, by default). When you call the CExtDynamicBarSite::StateLoad() method, each dynamic control bar window is destroyed and consequently all their child windows get also destroyed. And although the dynamic bar site recreates all simple bars according to serialized information, you need to recreate all child windows and assign them to the dynamic control bar windows yourself. In some cases, that may cause some unwanted flickering and redesign of the existing application.

Persistent dynamic control bars (bPersistentBar==true). When you call the CExtDynamicBarSite::StateLoad() method, dynamic control bar windows are not destroyed. Their child windows are also left untouched. The dynamic bar site just checks that the number of previously saved control bars and those in memory are the same. After that it simply renews the control bars with serialized information.

You can use control bars of both types in your application simultaneously and some methods of the dynamic bar sites allow you to specify which control bars should be affected by them, for example:

void BarEnumGetArray (
    CTypedPtrArray < CPtrArray, 
    CExtDynamicControlBar * > & arrAllDynamicBars,
    bool bIncludePersistentBars = true,
    bool bIncludeDynamicBars = true
);
INT BarEnumGetCount (
    bool bIncludePersistentBars = true,
    bool bIncludeDynamicBars = true
);