/*VC实现文件拖放
by exchen
2009-10-10
*/
void CMyDlg::OnDropFiles(HDROP hDropInfo)
{
// TODO: Add your message handler code here and/or call default
TCHAR szBuf[ MAX_PATH ]={0};
DragQueryFile(hDropInfo, 0, szBuf, MAX_PATH-1);
GetDlgItem(IDC_EDIT1)->SetWindowText(szBuf);
DragFinish(hDropInfo);
CDialog::OnDropFiles(hDropInfo);
}
转载请注明:exchen's blog » VC 实现文件拖放