Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9189411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:13:50+00:00 2026-06-17T20:13:50+00:00

I have an application that mimics Windows Explorer, it uses a TcxShellListView amongst other

  • 0

I have an application that mimics Windows Explorer, it uses a TcxShellListView amongst other shell controls.

A really nice feature would be to be able to Copy & Paste and Cut & Paste files between the real Windows Explorer and my application.

Drag & Drop already works out of the box, but it seems that DevExpress hasn’t implemented the clipboard side, yet.

Any Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:13:52+00:00Added an answer on June 17, 2026 at 8:13 pm

    If you want to implement the copy/paste yourself, the mechanism is almost identical to drag and drop. The drag and drop code that you have will create an IDataObject. To copy, instead of calling DoDragDrop to initiate a drag, simply call OleSetClipboard passing the IDataObject. And for pasting you call OleGetClipboard to get the IDataObject from the clipboard. And then you simply use the exact same code as for a drop operation to decode the IDataObject. That’s all there is to it.

    There is another way to do it, probably a better approach in my view. And that is to use IContextMenu to do the work. And example of this can be found in the TurboPower tpShellShock project. Have a look for ShellMenuExecute in the StShlCtl unit. So long as the DevExpress component is using the shell interfaces, i.e. IShellFolder, then you will be able to use that same approach. The advantage of this shell based approach is that you are getting the shell to do the work. If a copy dialog needs to be shown, then the shell will do so. This will give you the most integrated user experience.

    This code looks like this:

    procedure ShellMenuExecute(
      const Sender : TObject; const Folder : IShellFolder;
      var Pidl : PItemIDList; const Count : Integer;
      const AHandle : THandle; ClipboardAction : TStMenuAction);
    var
      CM : IContextMenu;
      CI : TCmInvokeCommandInfo;
    begin
      if Folder <> nil then begin
        if (Folder.GetUIObjectOf(AHandle, Count, Pidl,
          IID_IContextMenu, nil, Pointer(CM)) = NOERROR)
        then begin
          ZeroMemory(@CI, SizeOf(CI));
          CI.cbSize := SizeOf(TCmInvokeCommandInfo);
          CI.hwnd := AHandle;
          case ClipboardAction of
            caCut   : CI.lpVerb := 'cut';
            caCopy  : CI.lpVerb := 'copy';
            caPaste : CI.lpVerb := 'paste';
            caProperties : CI.lpVerb := 'properties';
          end;
          CM.InvokeCommand(CI);
          CM := nil;
        end;
      end;
    end;
    

    I think you should be able to use this code pretty much as is. I would point out that the handle parameter is declared incorrectly. It should be HWND. It’s used as the owning window for any dialog that is shown during the call to InvokeCommand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that executes workflows using WorkflowApplication as well as doing other
I have application that makes different queries with different results so the caching in
I have application that is connecting to the DB and if I enter incorrect
I have application that is up more than 3 days. I can see in
I have application that brings response via Ajax and creates 5-20 new jQuery click
I am building a Rails application that contains Developer s who have Application s.
I have an application that goes like this F5 load balancer - IHS(a&b) -
I have a application that runs very well on JBoss using JSF 2. I
I have an application that lives in the menubar, without a main menu or
I have an application that is successfully deploying on tomcat, which I must migrate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.