One of the functions I'm working on is the ability to drag and drop objects from the main window and transfer them to Windows Explorer as files.
To do this, we redefine COleDataSource::OnRenderGlobalData() and, when the format is CF_HDROP , we save each object as a file. This works great when the number of objects is small.
However, since we are currently working on supporting the number of objects at the enterprise level, we see large delays, sometimes leading to freezes or possible crashes when a user tries to drag a lot of objects from our application into Windows Explorer.
I assume this is because OnRenderGlobalData() is called quite a few times, and, of course, each time it has to iterate over objects that are being dragged and save them as files.
I was looking for the idea of overriding OnRenderFileData() , but the problem is that it only deals with one file at a time.
Is there a way to speed up our application when a user tries to drag a lot of objects into Windows Explorer, preferably moving the save loop to a place where it can be executed only once when the actual crash occurs
source share