Passes the name of every predefined character set string to a callback function.
procedure GetCharsetValues(Proc: TGetStrProc);
GetCharsetValues(TGetStrProc Proc);
Graphics
Call GetCharsetValues to execute a callback for every character set name that has a corresponding constant defined in the application. The Proc parameter is the callback function that is called for every character set constant name.
Delphi Examples:
{ 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: } var CharSetList : TStringList; procedure TForm1.AddCharacterSet(const S: string); begin CharSetList.Add(S); end; { Here is the code that creates the string list, fills it, and sorts the character set names. } procedure TForm1.Button1Click(Sender: TObject); begin CharSetList := TStringList.Create; Graphics.GetCharsetValues(AddCharacterSet); CharSetList.Sort; ListBox1.Items := CharSetList; CharSetList.Destroy; end;
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|