//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "GetCharsetValues.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: GetCharsetValues
// Routine: Graphics.GetCharsetValues

// BeginCode
/*
The following uses the GetCharsetValues procedure to fill a
string list with the names of all the available character
set constants. This string list can then be used to allow
the user to select a character set.  Here is the callback
that adds the character sets to the string list:
*/
TStringList *CharSetList;

void __fastcall TForm1::AddCharacterSet(const UnicodeString S)
{
  CharSetList->Add(S);
}

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  CharSetList = new TStringList();
  GetCharsetValues(AddCharacterSet);
  CharSetList->Sort();
  ListBox1->Items = CharSetList;
  delete CharSetList;
}
// EndCode
// EndExample: GetCharsetValues
//---------------------------------------------------------------------------
