几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】drag and drop in odamfcapp (http://www.dimcax.com/hust/showthread.php?t=15781)

yang686526 2009-05-04 08:05 PM

【转帖】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.