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?
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.