Jump to content

CN DRAGAFTER: Difference between revisions

From EDM2
Created page with "This message is sent by the container control to its owner whenever the container receives a DM_DRAGOVER message, but only if the CA_ORDEREDTARGETEMPHASIS or CA_MIXEDTARGETEMPHASIS attribute of the CNRINFO data structure is set and the current view is the name, text, or details view. ==Syntax== <PRE> param1 USHORT id; Container control ID.: USHORT CN_DRAGAFTER; Notification code.: param2 PCNRDRAGINFO pCnrDragInfo; /* Pointer to a CNRDRAGINF..."
 
No edit summary
 
Line 19: Line 19:
;CN_DRAGAFTER ([[USHORT]]) - Input
;CN_DRAGAFTER ([[USHORT]]) - Input
: Notification code.
: Notification code.
;pCnrDragInfo ([[PCNRDRAGINFO]]) - Input
;pCnrDragInfo (P[[CNRDRAGINFO]]) - Input
: Pointer to a [[CNRDRAGINFO]] structure.
: Pointer to a [[CNRDRAGINFO]] structure.



Latest revision as of 22:01, 20 April 2025

This message is sent by the container control to its owner whenever the container receives a DM_DRAGOVER message, but only if the CA_ORDEREDTARGETEMPHASIS or CA_MIXEDTARGETEMPHASIS attribute of the CNRINFO data structure is set and the current view is the name, text, or details view.

Syntax

param1
USHORT id;            /* Container control ID. */
USHORT CN_DRAGAFTER;  /* Notification code. */

param2
PCNRDRAGINFO pCnrDragInfo; /* Pointer to a CNRDRAGINFO structure. */

returns
USHORT usDrop;       /* Drop indicator. */
USHORT usDefaultOp;  /* Default operation. */

Parameters

id (USHORT) - Input
Container control ID.
CN_DRAGAFTER (USHORT) - Input
Notification code.
pCnrDragInfo (PCNRDRAGINFO) - Input
Pointer to a CNRDRAGINFO structure.

Returns

usDrop (USHORT) - returns
Drop indicator.
DOR_DROP: The record can be dropped. The drop will not occur unless DOR_DROP is returned. When this response is returned, the container control applies ordered target emphasis to the target record.
DOR_NODROP: The record is acceptable and the current operation is supported by the target, but the record cannot be dropped in the current location. For example, the container control returns DOR_NODROP if the record being dragged is positioned over another record on which it cannot be dropped. If the container returns DOR_NODROP, the DM_DRAGOVER message will continue to be sent to it when the user does any of the following: moves the pointer, presses a keyboard key, moves the pointer out of and back into the container window.
DOR_NODROPOP: The record is acceptable, but the target does not support the current operation. This response implies that the drop may be valid if the drag operation changes. For example, if the default operation is copy and the target does not support this operation, the drop may become valid if the user presses a keyboard augmentation key to change to a different operation, such as move. If the container returns DOR_NODROPOP, no further DM_DRAGOVER messages are sent until the user does any of the following: presses a keyboard key, moves the pointer out of and back into the container window.
DOR_NEVERDROP: The record cannot be dropped. Ordered target emphasis is not drawn. If the container returns DOR_NEVERDROP, no further DM_DRAGOVER messages are sent until the user drags the record outside of and back into the container window.
usDefaultOp (USHORT) - returns
Default operation.
DO_COPY: Operation is a copy.
DO_DEFAULT: Operation is the default drag operation. No modifier keys are pressed.
DO_LINK: Operation is a link.
DO_MOVE: Operation is a move.
DO_UNKNOWN: Operation is application-defined.

Remarks

The container control draws ordered target emphasis of container records. The target emphasis provided by the container control is a black line that is drawn below the target record. Therefore, it is not necessary for the application to draw any emphasis for the container when it receives this notification code.

If the container returns anything except DOR_DROP, the target emphasis is automatically changed to a symbol that indicates no drop is allowed. This gives the user a visual cue that a drop cannot occur. The symbol reverts to the black line when the container returns a DOR_DROP reply.

The CN_DRAGAFTER notification code is sent only for the details, name, and text views when the CA_ORDEREDTARGETEMPHASIS or CA_MIXEDTARGETEMPHASIS attribute of the CNRINFO data structure is set. If this attribute is not set, the CN_DRAGOVER notification code is sent.

Default Processing

The default window procedure does not expect to receive this notification code and therefore takes no action on it other than to return 0.