Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
945
UltraTextEditor Handle Paste Event
posted

When I inherit a System.Windows.Forms.Textbox, I can override the "WndProc" method and handle the paste event like this:

    Private Const WM_PASTE = &H302

    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        If (m.Msg = WM_PASTE) Then
            'do something
        End If

        MyBase.WndProc(m)
    End Sub

When I override Infragistics.Win.UltraWinEditors.UltraTextEditor, and try the same thing, the m.Msg never equals WM_PASTE (&H302).  How can I handle paste events in Infragistics.Win.UltraWinEditors.UltraTextEditor?

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    You can't. When the UltraTextEditor goes into edit mode, it displays a Microsoft TextBox control inside itself. It is this TextBox control that is receives the Paste message and since you cannot replace this TextBox with a derived class of your own, there's no way to do what you are describing. At least not by overriding the WndProc.