Static Data Members
The CPersistentFrame class stores its Registry key names in static const char array data members. What would the other storage choices be? String resource entries won't work because the strings need to be defined with the class itself. (String resources make sense if CPersistentFrame is made into a DLL, however.) Global variables are generally not recommended because they defeat encapsulation. Static CString objects don't make sense because the characters must be copied to the heap when the program starts.An obvious choice would be regular data members. But static data members are better because, as constants, they're segregated into the program's read-only data section and can be mapped to multiple instances of the same program. If the CPersistentFrame class is part of a DLL, all processes that are using the DLL can map the character arrays. Static data members are really global variables, but they're scoped to their class so there's no chance of name collisions.