void CMyLoadDriverDlg::OnDropFiles(HDROP hDropInfo)
{
char* pFilePathName = new char[MAX_PATH];
DragQueryFile(hDropInfo, 0, pFilePathName, MAX_PATH); // 获取拖放文件的完整文件名
SetDlgItemText(IDC_EDIT_DRIVER_PATH, pFilePathName);
//GetDriverName();
if(GetDriverName())
{
SetDlgItemText(IDC_DRV_NAME,this->m_csDriverName);
SetDlgItemText(IDC_DRV_PATH,m_csDriverPath);
}
::DragFinish(hDropInfo); // 注意这个不能少,它用于释放Windows 为处理文件拖放而分配的内存
delete[] pFilePathName;
CDialog::OnDropFiles(hDropInfo);
}