PM_LookupInit

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.

PM_LookupInit

The PM_LookupInit message is sent to combo boxes and lookup columns to initialize the drop-down list.

Parameters

Name Description
wParam Unused
lParam Unused

Returns

Unused (the Framework ignores the return value of this message)

Comments

The PM_LookupInit message is sent the first time the user drops down the list. Once the list has been populated, PM_LookupInit is not sent any more. Applications may call the LookupInvalidateData function to mark the current list data as invalid, and cause PM_LookupInit to be sent again the next time the list is dropped down.

Example

This example uses the PM_LookupInit message to repopulate the combo box every time the user drops down the list.

cComboBox: cmbRecentItems
On SAM_Click
   ! Override default behavior and always repopulate the combo box
   Call SalSendMsg( i_hWndSelf, PM_LookupInit, 0, 0 )
C# code
private void cComboBox_MessageActions(ref SalMessage message)
{
	#region Actions
	switch (message.Code)
	{
		case Sys.SAM_DropDown:
			this.cComboBox_OnSAM_DropDown(ref message);
			break;
	}
}

private void cComboBox_OnSAM_DropDown(ref SalMessage message)
{
	#region Actions
	message.Handled = true;
	this.__sOldValue = this.Text;
	// Do lookup if it's not been done before
	if (this.__bDoInitLookUp) 
	{
		Sal.SendMsg(this.i_hWndSelf, Const.PM_LookupInit, 0, 0);
	}
	#endregion
}