Jump to content

wpSetDefaultDropOp

From EDM2
Revision as of 21:37, 24 November 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpSetDefaultDropOp}} This method is specific to Version 4, or higher, of the OS/2 operating system. This instance method sets the default drop operation of objects that are dropped on the Desktop. The default is set on the Desktop page of the Desktop's Settings notebook. ==Syntax== _wpSetDefaultDropOp(somSelf, ulDefaultDropOp) ==Parameters== ;''somSelf'' (WPDesktop *) - input :Pointer to the object on which the method is being invoked. :Points to a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This method is specific to Version 4, or higher, of the OS/2 operating system.

This instance method sets the default drop operation of objects that are dropped on the Desktop. The default is set on the Desktop page of the Desktop's Settings notebook.

Syntax

_wpSetDefaultDropOp(somSelf, ulDefaultDropOp)

Parameters

somSelf (WPDesktop *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPDesktop.
ulDefaultDropOp (ULONG) - input
Flag for the default drop operation.
  • DO_LINK Create shadow of dropped object.
  • DO_MOVE Move dropped object.

Returns

rc (BOOL) - returns
Success indicator.
  • TRUE Successful completion.
  • FALSE Error occurred.

How to Override

This method is generally not overridden.

Usage

This method can be called at any time in order to set the default drop operation for a desktop folder.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPDesktop *somSelf; /* Pointer to the object on which the method is being invoked. */
ULONG ulDefaultDropOp;
BOOL rc; /* Success indicator */

rc = _wpSetDefaultDropOp(somSelf, ulDefaultDropOp);

/* Example code provided in the source: */
  WPDesktop    *Desktop;

  Desktop = _wpclsQueryObjectFromPath("<WP_DESKTOP>");
  _wpSetDefaultDropOp(somSelf,DO_MOVE);

Related Methods