Open the file context dialog, default action, etc.

On Windows, when you are in Windows Explorer and right-clicking on a file or directory, the Windows context menu appears with all the actions that can be done with respect to this file or directory.

Returning the same day, Brad Stowers wrote the ItemProp.pas block, which did the same thing within one Delphi native application. This device works great through Delphi 5, but for D7 and above, a lot of errors occur.

http://www.koders.com/delphi/fid7ABE724EBD5F2123FF824AFD45151D2A087C5E6C.aspx?s=network

Good! I admit it! I am lazy and have Googled for an updated module and even one like this, worked for a couple of hours trying to make this unit compatible with D7, but I think that I am missing something because I was not able to achieve any effort in regarding this.

So ... my question is: has anyone updated this module for D7 and above OR is there any block or component that makes this code?

Thanks in advance!

John

+5
source share
2 answers

I suspect all that is needed is to update the compiler version directives in DFS.inc

I added

{$DEFINE DFS_DELPHI}
{$DEFINE DFS_COMPILER_4_UP}
{$DEFINE DFS_NO_COM_CLEANUP}
{$DEFINE DFS_COMPILER_3_UP}

to the main file (ItemProp.pas), and it compiled OK on Delphi 2007, but I have not tried using the code yet.

+5
source

JADI JCLI, JclShell, DisplayContextMenu, .

function DisplayContextMenu(const Handle: HWND; const FileName: string;
  Pos: TPoint): Boolean;
+5

All Articles