Solved

How to hook into windows copy dialog box

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

863 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

23 Experts available now in Live!

Get 1:1 Help Now