Solved

How to hook into windows copy dialog box

Posted on 2002-04-14
5
264 Views
Last Modified: 2010-08-05
I would like to create a custom copy dialog window
and would need the copy info that is going on (size to copy, copy progress, file location and destination ect)

Is there a way to modify or watch for a windows copy dialog window?

How could i do this?

Thanks,
geo
0
Comment
Question by:geo90
  • 3
5 Comments
 
LVL 22

Accepted Solution

by:
ambience earned 300 total points
ID: 6941048
I think you should have a look into ICopyHook interface. Shell extensions implement that interface.

The shell calls the ICopyHook::CopyCallback method prior to performing one of these operations. This lets you customize the way operations are performed. Also you can prevent the operation.

The hwnd parameter of the only callback function would let you add any user interface elements you need to display.

Other parameters give you information about the source and destination etc and some flags too.

0
 
LVL 22

Expert Comment

by:ambience
ID: 6941051
forgot to mention that the operations are move, copy, rename, or remove.
0
 
LVL 22

Expert Comment

by:ambience
ID: 6941052
In other words you create a COM dll, that implements ICopyHook interface. You register that dll as an extension using Registry keys, and each time an operation occurs you get notified of it and do whatever you want.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6941263
My read of the docs indicates that ICopyHook gets a callback only for attempts to copy, move, etc. FOLDERS, and so I think it would not be too helpful for individual files.

-- Dan
0
 
LVL 4

Expert Comment

by:AssafLavie
ID: 6946156
Read Dino Sposito's book about Visual C++ windows shell programming.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question