public void OnEvent(PDFXEdit.IUIX_Obj pSender, PDFXEdit.IUIX_Event pEvent) { if (pEvent.Code == (int)PDFXEdit.UIX_EventCodes.e_First) { m_Obj = pSender; SetParent(m_UserCtrl.Handle, (IntPtr)m_Obj.WndHandle); } else if (pEvent.Code == (int)PDFXEdit.UIX_EventCodes.e_Last) { m_Obj = null; } else if (pEvent.Code == (int)WM_SIZE) { var rc = m_Obj.ClientRect; m_UserCtrl.Location = new Point(rc.left, rc.top); m_UserCtrl.Size = new Size((rc.right - rc.left), (rc.bottom - rc.top)); } }
public void OnEvent(PDFXEdit.IUIX_Obj pSender, PDFXEdit.IUIX_Event pEvent) { if (pEvent.Code == (int)PDFXEdit.UIX_EventCodes.e_First) { m_Obj = pSender; } else if (pEvent.Code == (int)PDFXEdit.UIX_EventCodes.e_Last) { m_Obj = null; } else if (pEvent.Code == (int)PDFXEdit.UIX_EventCodes.e_PositionChanged) { var rc = m_Obj.get_Rect(); userControl.Left = rc.left; userControl.Top = rc.top; userControl.Width = rc.right - rc.left; userControl.Height = rc.bottom - rc.top; } }
public void OnPreEvent(PDFXEdit.IUIX_Obj pSender, PDFXEdit.IUIX_Event pEvent) { }