Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions desktop-src/shell/clipboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ This format identifier is used by the source to specify whether its preferred me

This feature is used when a source can support either a move or copy operation. It uses the [CFSTR_PREFERREDDROPEFFECT](#cfstr_preferreddropeffect) format to communicate its preference to the target. Because the target is not obligated to honor the request, the target must call the source's [**IDataObject::SetData**](/windows/win32/api/objidl/nf-objidl-idataobject-setdata) method with a [CFSTR_PERFORMEDDROPEFFECT](#cfstr_performeddropeffect) format to tell the data object which operation was actually performed.

With a [delete-on-paste](datascenarios.md) operation, the CFSTR_PREFERREDDROPFORMAT format is used to tell the target whether the source did a cut or copy. With a drag-and-drop operation, you can use CFSTR_PREFERREDDROPFORMAT to specify the Shell's action. If this format is not present, the Shell performs a default action, based on context. For instance, if a user drags a file from one volume and drops it on another volume, the Shell's default action is to copy the file. By including a CFSTR_PREFERREDDROPFORMAT format in the data object, you can override the default action and explicitly tell the Shell to copy, move, or link the file. If the user chooses to drag with the right button, CFSTR_PREFERREDDROPFORMAT specifies the default command on the [drag-and-drop](context-menu-handlers.md) shortcut menu. The user is still free to choose other commands on the menu.
With a [delete-on-paste](datascenarios.md) operation, the [CFSTR_PREFERREDDROPEFFECT](#cfstr_preferreddropeffect) format is used to tell the target whether the source did a cut or copy. With a drag-and-drop operation, you can use [CFSTR_PREFERREDDROPEFFECT](#cfstr_preferreddropeffect) format to specify the Shell's action. If this format is not present, the Shell performs a default action, based on context. For instance, if a user drags a file from one volume and drops it on another volume, the Shell's default action is to copy the file. By including a [CFSTR_PREFERREDDROPEFFECT](#cfstr_preferreddropeffect) format in the data object, you can override the default action and explicitly tell the Shell to copy, move, or link the file. If the user chooses to drag with the right button, [CFSTR_PREFERREDDROPEFFECT](#cfstr_preferreddropeffect) format specifies the default command on the [drag-and-drop](context-menu-handlers.md) shortcut menu. The user is still free to choose other commands on the menu.

Before Microsoft Internet Explorer 4.0, an application indicated that it was transferring shortcut file types by setting FD_LINKUI in the **dwFlags** member of the [**FILEDESCRIPTOR**](/windows/win32/api/shlobj_core/ns-shlobj_core-filedescriptora) structure. Targets then had to use a potentially time-consuming call to [**IDataObject::GetData**](/windows/win32/api/objidl/nf-objidl-idataobject-getdata) to find out if the FD_LINKUI flag was set. Now, the preferred way to indicate that shortcuts are being transferred is to use the CFSTR_PREFERREDDROPEFFECT format set to DROPEFFECT_LINK. However, for backward compatibility with older systems, sources should still set the FD_LINKUI flag.
Before Microsoft Internet Explorer 4.0, an application indicated that it was transferring shortcut file types by setting FD_LINKUI in the **dwFlags** member of the [**FILEDESCRIPTOR**](/windows/win32/api/shlobj_core/ns-shlobj_core-filedescriptora) structure. Targets then had to use a potentially time-consuming call to [**IDataObject::GetData**](/windows/win32/api/objidl/nf-objidl-idataobject-getdata) to find out if the FD_LINKUI flag was set. Now, the preferred way to indicate that shortcuts are being transferred is to use the [CFSTR_PREFERREDDROPEFFECT](#cfstr_preferreddropeffect) format set to DROPEFFECT_LINK. However, for backward compatibility with older systems, sources should still set the FD_LINKUI flag.

### CFSTR_TARGETCLSID

Expand Down