Nice to see you're still around Chris. I've been working on allot of BlackBerry and other platforms for the past year, but back on CF v3.5 .... nice to be home again.
I ran into a similar issue on the TextBox control where I wanted to handle the painting of the boarder and some additional effects, but didn't feel like writing a TextBox from the ground-up. That's allot of work, as I now know after building a fully functional one for BlackBerry. Much better to extend the existing TextBox and simply provide your own painting logic. I wish I knew why there's no exposed paint event to register for, or why the OnPaint() from the Control class never gets invoked from the TextBox .... would have made life MUCH simplier!!
Very happy I came across your reply here because it got me thinking in a different way on how to solve my problem. I have essentially replaced the default Windows Procedure function with my own C# delegate. But, in order to have the "default behavior" still execute ... painting all the text, cursors, scrollbars in the text field, etc., etc., thereby leaving me with the small task of handling my boarder and special effects (much less work then building a TextBox control from scratch) I simply invoke the "OldWindowsProc" before I execute my painting commands.
Works like a charm!!
The following links on MSDN gave me the needed pieces to make it work:
http://msdn.microsoft.com/en-us/library/ms633569%28VS.85%29.aspx
Also, check out ms229681(VS.80).aspx too.
Thanks Chris for posting your reply above because this is a much better way then either building a full TextBox control, or building some lame excuse of a Textbox control all in the name of being able add a little additional painting logic.
Thanks