Search code examples
windowswinapiwindows-xp

How can I override or customize the delete confirmation dialog in Windows?


When we press Shift+Delete key, a delete confirmation dialog is generated. I want to handle this dialog according my need or change its message. Can anyone tell me what thing is responsible for that dialog?

I either need to know the code which handles the delete confirmation dialog generated by the Shift+Delete key sequence in Windows XP, or the code by which we can control this operation.


Solution

  • I don't think what you want to do is going to be fun.

    Im guessing you have to intercept the SHFileOperation function (and the IFileOperation interface for Vista onward)

    Here what my google-fu got me on winapi interception: http://www.codeproject.com/kb/system/hooksys.aspx

    You might want to look at this : http://easyhook.codeplex.com/

    This project supports extending (hooking) unmanaged code (APIs) with pure managed ones, from within a fully managed environment like C# using Windows 2000 SP4 and later...

    Good Luck! =)