Placing a control in an edit control's NC area
-
I've looked all around CP and MSDN for a way to place a control (e.g. a button) within an edit control's non-client area, but haven't had any luck. All of the implementations I have seen haven't really placed controls there, but have just mimicked the control by resizing and painting the NC area. Like this: http://www.codeproject.com/editctrl/fileeditctrl.asp[^] I tried just placing the control in the client area, but it gets painted over as soon as the user clicks in the edit box, which is ugly. Can someone point me in the right direction? Thanks.
-
I've looked all around CP and MSDN for a way to place a control (e.g. a button) within an edit control's non-client area, but haven't had any luck. All of the implementations I have seen haven't really placed controls there, but have just mimicked the control by resizing and painting the NC area. Like this: http://www.codeproject.com/editctrl/fileeditctrl.asp[^] I tried just placing the control in the client area, but it gets painted over as soon as the user clicks in the edit box, which is ugly. Can someone point me in the right direction? Thanks.
Since an edit control has no non-client area the article you found is probubly the best place to start. Trust in the code Luke. Yea right!