标签:技术 拖拽 style item nbsp bsp box code har
对话框,Accept Files(True)
void CMFCDragFileDlg::OnDropFiles(HDROP hDropInfo) { TCHAR szPath[MAX_PATH] = {0}; UINT nCount = DragQueryFile(hDropInfo, 0xFFFFFFFF, NULL, 0); for(UINT i = 0; i < nCount; i++) { DragQueryFile(hDropInfo, i, szPath, MAX_PATH); int iGender = GetCheckedRadioButton(IDC_RADIO1, IDC_RADIO2); switch (iGender) { case IDC_RADIO1: SetDlgItemText(IDC_EDIT1,szPath); break; case IDC_RADIO2: if (m_combobox.FindString(0, szPath) < 0)//已存在则不添加 { m_combobox.AddString(szPath); } break; } } CDialog::OnDropFiles(hDropInfo); }
标签:技术 拖拽 style item nbsp bsp box code har
原文地址:http://www.cnblogs.com/nonebutnow/p/6009005.html