/*
OnSettingChange, SysLocale, BoolToStr example
*/
void __fastcall TForm1::ApplicationEvents1SettingChange(TObject *Sender, int Flag, const AnsiString Section, int &Result)
{
  Memo1->Lines->BeginUpdate();
  try
  {
    char buffer[64];
    sprintf(buffer, "Section = %s", Section.c_str());
    Memo1->Lines->Add(AnsiString(buffer));
    sprintf(buffer, "Flag = %8x", Flag);
    Memo1->Lines->Add(AnsiString(buffer));
    if (strcmp(Section.c_str(), "intl") == 0)
    {
      sprintf(buffer, "DefaultLCID = %8x", SysLocale.DefaultLCID);
      Memo1->Lines->Add(AnsiString(buffer));
      sprintf(buffer, "PriLangID = %8x", SysLocale.PriLangID);
      Memo1->Lines->Add(AnsiString(buffer));
      sprintf(buffer, "SubLangID = %8x", SysLocale.SubLangID);
      Memo1->Lines->Add(AnsiString(buffer));
      sprintf(buffer, "FarEast = %s", BoolToStr(SysLocale.FarEast, true));
      Memo1->Lines->Add(AnsiString(buffer));
      sprintf(buffer, "MiddleEast = %s", BoolToStr(SysLocale.MiddleEast, true));
      Memo1->Lines->Add(AnsiString(buffer));
      Memo1->Lines->Add("");
    }
  }
  __finally
  {
    Memo1->Lines->EndUpdate();
  }
}
 
