SysUtilsStrLower (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example uses an edit box, two labels, and a button on a form. When the button is clicked, the text in the edit control is displayed in lowercase in the caption of label1 and in uppercase in the caption of label2'. The text is also displayed in uppercase in the label. Notice that lower is altered by the call to StrUpper.


Code

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  wchar_t *lower, *upper;
  lower = StrLower(Edit1->Text.c_str());
  Label1->Caption = lower;
  Label1->Refresh();
  Sleep(5000);
  upper = StrUpper(Edit1->Text.c_str());
  Label1->Caption = lower;
  Label2->Caption = upper;
}

Uses