Home > Software engineering >  MFC clipboard according to mouse position after access to click the right mouse button will be copie
MFC clipboard according to mouse position after access to click the right mouse button will be copie

Time:11-22

I'm doing the clipboard function, when selecting file, click the right mouse button after point replication, and then click the right mouse button will appear under the desktop or folder paste button, I want to ask if will be copied to the directory path, consult everybody,

CodePudding user response:

Drag files??

CodePudding user response:

 if (OpenClipboard ()) 
{
Do
{
HDROP HDROP=(HDROP) GetClipboardData (CF_HDROP);
If (hDrop==NULL) break;
UINT uNums=: : DragQueryFile (hDrop (UINT) (1), NULL, 0).
For (UINT iFile=0; IFile{
TCHAR szPath [MAX_PATH + 1)={0};
If (DragQueryFile (hDrop, iFile, szPath, MAX_PATH))
{
TRACE (_T (" File=% d % s \ n "), iFile + 1, szPath);
}
}
} while (0);


CloseClipboard ();
}


CodePudding user response:

Zgl7903, right, it is like that, I can get after click copy to clipboard access to the file path information, but I want to right click on the table or disk C, for example, right-click menu will appear, if copying the files inside, will be the paste button effect, can I point paste button to copy the file, I want to ask how to obtain will be copied to the directory path,
Because I am doing the remote control to bidirectional copying and pasting text and images can be, doing now two-way copy and paste files,

CodePudding user response:

You may need to HOOK file operations related API interface, or consider from the direction of file filter driver ~

CodePudding user response:

7-eleven, which functions to hook, can you tell me,

CodePudding user response:

Void CMyAnimateCtrl: : OnDropFiles (HDROP HDROP)

CodePudding user response:

Well, I went back to try it,
  • Related