|
아래는 C++ Builder Help의 예제 입니다.
void __fastcall TForm1::FormCreate(TObject* Sender)
{
Button1->Caption = "Ignore Messages";
Button2->Caption = "Handle Message";
}
void __fastcall TForm1::Button1Click(TObject* Sender)
{
int x, y;
for (int i = 0; i < 64000; i++)
{
Randomize();
for (int j = 0; j < 64000; j++)
y = random(j);
x = random(i);
}
Canvas->TextOut(10, 10, "The Button1Click handler is finished");
}
void __fastcall TForm1::Button2Click(TObject *Sender)
{
int x, y;
for (int i = 0; i < 64000; i++)
{
Randomize();
for (int j = 0; j < 64000; j++)
{
y = random(j);
Application->ProcessMessages();
}
x = random(i);
}
Canvas->TextOut(10, 10, "The Button2Click handler is finished");
|