C++Builder相談室 Part4
■ このスレッドは過去ログ倉庫に格納されています
0642デフォルトの名無しさん
NGNG{
OldEditWndProc = Edit1->WindowProc;
Edit1->WindowProc = NewEditWndProc;
DragAcceptFiles(Edit1->Handle, TRUE);
}
void __fastcall TForm1::NewEditWndProc(TMessage& message)
{
if (message.Msg == WM_DROPFILES)
{
char buffer[MAX_PATH];
DragQueryFile((HDROP)message.WParam, 0, buffer, MAX_PATH);
DragFinish((HDROP)message.WParam);
Edit1->Text = buffer;
}
if (message.Msg == CM_RECREATEWND)
DragAcceptFiles(Edit1->Handle, FALSE);
OldEditWndProc(message);
if (message.Msg == CM_RECREATEWND)
DragAcceptFiles(Edit1->Handle, TRUE);
}
■ このスレッドは過去ログ倉庫に格納されています