event DblClick (Shift as Integer, X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS)
Occurs when the user dblclk the left mouse button over an object.

 TypeDescription 
   Shift as Integer An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys.  
   X as OLE_XPOS_PIXELS A single that specifies the current X location of the mouse pointer. The x values is always expressed in container coordinates  
   Y as OLE_YPOS_PIXELS A single that specifies the current Y location of the mouse pointer. The y values is always expressed in container coordinates  
The DblClick event is fired when the user dbl clicks on the control. Use the DblClick event to notify your application that a cell has been double-clicked. Use the EditorFromPoint property to get the editor from the point.

The following VB sample displays the editor being double clicked:

Private Sub Record1_DblClick(Shift As Integer, X As Single, Y As Single)
    Dim e As EXRECORDLibCtl.Editor
    Set e = Record1.EditorFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY)
    If Not e Is Nothing Then
        Debug.Print e.Label
    End If
End Sub

The following VC sample displays the editor being double clicked:

void OnDblClickRecord1(short Shift, long X, long Y) 
{
	CEditor editor = m_record.GetEditorFromPoint( X, Y );
	if ( editor.m_lpDispatch != NULL )
	{
		TCHAR szOutput[1024];
		wsprintf( szOutput, "%s", (LPCTSTR)editor.GetLabel() );
		OutputDebugString( szOutput );
	}
}

Send comments on this topic.
© 1999-2007 Exontrol Inc, Software. All rights reserved.