![]() |
【转帖】drag and drop in odamfcapp
drag and drop in odamfcapp
drag and drop in odamfcapp hi, i have modified the odamfcapp to support the drag n drop. as it only needs a few lines of code, maybe someone could integrate it in the official sample. mainfrm.h insert at line 81: code: afx_msg void ondropfiles(hdrop hdropinfo);mainfrm.cpp insert at line 22: code: on_wm_dropfiles()mainfrm.cpp insert at line 71: code: dragacceptfiles(true);mainfrm.cpp insert at the end of file: code: void cmainframe::ondropfiles(hdrop hdropinfo) { int filenumber, index; tchar filename[_max_path]; filenumber = dragqueryfile(hdropinfo, -1, filename, _max_path); for(index = 0; index < filenumber; index++) { dragqueryfile(hdropinfo, index, filename, _max_path); afxgetapp()->opendocumentfile(filename); } // release handle memory dragfinish(hdropinfo); }hope this helps aur閘ien telmon |
所有的时间均为北京时间。 现在的时间是 01:11 PM. |