CGXProperties::ReadProfile
virtual BOOL ReadProfile();
Return Value
TRUE if profile section exists; FALSE if not.
Remarks
Reads the settings from the profile section specified with SetSection.
You should call this method after creating the property-object and after adding user-defined properties or setting default values. See the example.
Control-Factory Specific ->
This method has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the CGXStyle::ImplementProfile method from within the control factory class' InitializeApplicationComponents method will make the concrete implementation of this method available to your application.
If no concrete implementation is available this method returns FALSE. A warning will be displayed in the debug window.
END Control-Factory Specific
Example
This example shows you how to read data from the profile:
// create a property object and connect it with the parameter-object
CGXProperties* pProp = new CGXProperties;
// some default initialization
pProp->AddDefaultUserProperties();
// specify default settings
// Now, read the properties from profile.
// Note that reading properties from profile can override the previous settings.
pProp->SetSection("My Properties"); // extra profile section
pProp->ReadProfile();
// connect property object with parameter object
GetParam()->SetProperties(pProp);
See Also
CGXProperties::CGXProperties CGXProperties::WriteProfile CGXProperties::SetSection