<< Return to Main Index

< Return to Class Index

CGXProperties::SetSection

void SetSection(LPCTSTR pszSection);

pszSection

Points to a string with the name for the profile section.

Remarks

Specifies the name for the profile section where the object settings should be stored and loaded from.

If you want to read the settings from the profile, you should call SetSection before ReadProfile:

      // create a property object and connect it with the parameter-object
      CGXProperties* pProp = new CGXProperties;

      // some default initialization
      pProp->AddDefaultUserProperties();

      pProp->SetCenterHorizontal(TRUE);
      pProp->SetBlackWhite(TRUE);

      // 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();

See Also

CGXProperties::ReadProfile CGXProperties::GetSection

CGXProperties

Class Overview | Class Members