PM_DataItemQueryEnabled

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

Const.PM_DataItemQueryEnabled

An application or the framework sends the Const.PM_DataItemQueryEnabled message to a data item to find out if the data item is currently editable.

Parameters

Name Description
nParam Unused
lParam Unused

Returns

The return value is Const.EDITSTATEFieldEnabled if the field is currently editable, or Const.EDITSTATEFieldEnabled if the field is not editable.

Comments

Whether a data item is editable or not depends on both the properties (updateable, insertable) and the state of the current record (new, modified etc.).

Example

This example sends the Const.PM_DataItemQueryEnabled message to find out if the user is allowed to paste data into the current field.

On WM_PASTE  
    If SalSendMsg( i_hWndSelf, PM_DataItemQueryEnabled, 0, 0 ) = EDITSTATEFieldNotEnabled
       Call SalMessageBeep( 0 )
       Return FALSE
private void cEditControlsManager_OnWM_PASTE(ref SalMessage message)
{
	#region Actions
	message.Handled = true;
	if (Sal.SendMsg(this.i_hWndSelf, Const.PM_DataItemQueryEnabled, 0, 0) ==
Const.EDITSTATEFieldNotEnabled) { Sal.MessageBeep(0); message.Return = false; return; } #endregion }