Solved

How to hook into windows copy dialog box

Posted on 2002-04-14
5
242 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now