|
.
Form 위에 Timer와 OpenDialog, Memo를 올려놓고 다음처럼 했는데
Timer를 사용했다는게 약간 걸리기는 하지만, 잘 동작합니다.
이 방법으로 안돼면 다시 질문 하십시요.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
OpenDialog1->Execute( );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OpenDialog1Show(TObject *Sender)
{
Timer1->Enabled = TRUE;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
if ( ShowWindow( OpenDialog1->Handle, SW_SHOWNA ) == false )
return;
Timer1->Enabled = false;
TRect lrRect;
GetWindowRect( OpenDialog1->Handle, &lrRect );
AnsiString str;
str.sprintf( "Left = %d, Top = %d, Right = %d, Bottom = %d",
lrRect.Left,
lrRect.Top,
lrRect.Right,
lrRect.Bottom );
Memo1->Lines->Add( str );
}
//---------------------------------------------------------------------------
.
|