471,354 Members | 1,246 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Paste event in control library with rich text box

I have created a control with a rich text box, and I need to capture
the paste event to do some additional work when a user pastes text. I
can't do this on hte text change because Someone could possibly paste
an enormous amount of data and slow the program down too much. I have
the following code that catches other events on the control but not the
WM_PASTE. If the WM_PASTE is not raised on the Rich Text box where can
I catch it? I tried similiar code in the control class but it didn't
work there either.

protected override void WndProc(ref Message m)
int i = 0;

switch (m.Msg)
case (int) WndProcHandler.WINDOWSMSGENUM.WM_CREATE :

i = i + 5;

case (int) WndProcHandler.WINDOWSMSGENUM.WM_PASTE:
i = i + 1;


base.WndProc(ref m);


Feb 11 '06 #1
0 1382

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by chirs | last post: by
3 posts views Thread by Richard Price | last post: by
7 posts views Thread by Rich Milburn [MVP] | last post: by
8 posts views Thread by michael sorens | last post: by
6 posts views Thread by Ben R. | last post: by
17 posts views Thread by Steve | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.