You are here:

C++/windows copy dialog


i'm looking for a way to replace the windows(XP) copy dialog with my own program that will copy the file instead of the explorer when it is being draged from one place to another.
i know this isn't trivial, but i'm just looking for a general idea of how this can be done.
i'm not afraid of c++/vb/hooking/com-objects/registry/whatever
thanks, Ronen.

Hmm, this is not really a C++ problem is it? Not only that but I am not sure in what context this dragging and dropping is occurring.

If it is in the Explorer or desktop or other parts of the MS Windows shell – which as you mention the standard copy dialogs I presume it is - then your best place to start is to look at the documentation for the Windows shell. This is also true if you wish to add support for your own type of shell objects. Start with the MSDN library – either your local copy if you  have one - my July 2004 edition has the information under User Interface Design and Development / Windows Shell – or online at – which has the material under Win32 and COM Development / User Interface / Windows User Experience / Windows Shell. Note that I am not at all sure if you can just replace/customise this part of the MS Windows shell wholesale, as I have never had to do it.

If however you are looking to implement file or other object drag and drop in your own programs then you might be better off looking at drag and drop in general and the likes of IDropTarget and IDropSource etc... under Component Development / Component Object Model (General) / COM SDK Documentation / COM / OLE and Data Transfer or  online under Win32 and Com Development / Component Object Model (General) / SDK Documentation / COM / OLE and Data Transfer.

It is most likely you will need to know about both the Windows shell and drag and drop development, see for example the promising article in the MSDN library online under Win32 and COM Development / User Interface / Windows User Experience / Windows Shell / SDK / Windows Shell / Shell Programmer's Guide / Shell Basics / Shell Basics: Programming the Shell / Transferring Shell Objects with Drag-and-Drop and the Clipboard / Handling Shell Data Transfer Scenarios.

Having read up on the ‘basic theory' as it were you should then look to see if there is any help form other products – such as the MFC or ATL or .NET frameworks that will make life easier for you. You should also look for any useful examples. Finally check out what is out there on the internet (e.g. by a Google search) to see if anyone has done anything like what you wish – and maybe even has some source code you can peruse!


All Answers

Answers by Expert:

Ask Experts


Ralph McArdell


I am a software developer with more than 15 years C++ experience and over 25 years experience developing a wide variety of applications for Windows NT/2000/XP, UNIX, Linux and other platforms. I can help with basic to advanced C++, C (although I do not write just-C much if at all these days so maybe ask in the C section about purely C matters), software development and many platform specific and system development problems.


My career started in the mid 1980s working as a batch process operator for the now defunct Inner London Education Authority, working on Prime mini computers. I then moved into the role of Programmer / Analyst, also on the Primes, then into technical support and finally into the micro computing section, using a variety of 16 and 8 bit machines. Following the demise of the ILEA I worked for a small company, now gone, called Hodos. I worked on a part task train simulator using C and the Intel DVI (Digital Video Interactive) - the hardware based predecessor to Indeo. Other projects included a CGI based train simulator (different goals to the first), and various other projects in C and Visual Basic (er, version 1 that is). When Hodos went into receivership I went freelance and finally managed to start working in C++. I initially had contracts working on train simulators (surprise) and multimedia - I worked on many of the Dorling Kindersley CD-ROM titles and wrote the screensaver games for the Wallace and Gromit Cracking Animator CD. My more recent contracts have been more traditionally IT based, working predominately in C++ on MS Windows NT, 2000. XP, Linux and UN*X. These projects have had wide ranging additional skill sets including system analysis and design, databases and SQL in various guises, C#, client server and remoting, cross porting applications between platforms and various client development processes. I have an interest in the development of the C++ core language and libraries and try to keep up with at least some of the papers on the ISO C++ Standard Committee site at


©2016 All rights reserved.