-
May 5th, 2009, 01:55 AM
#1
Change the shape of CEdit custom draw?
Hi,
I've created CCustomEdit inherited from CEdit and managed to change its background color and text color.
I'm trying to change the shape of it ( eg : on each end i plan to make it like curve a bit rather than 90 degrees )
Is there any ways to change the shape of the CEdit ? Any tutorials/sample would be highly appreciated. Can GDI able to change the style of it?
My project is MFC based.
With thanks,
KarHong
-
May 5th, 2009, 02:34 AM
#2
Re: Change the shape of CEdit custom draw?
Handle the WM_PAINT message to draw the edit yourself.
-
May 5th, 2009, 02:49 AM
#3
Re: Change the shape of CEdit custom draw?
Can you give me some sample on how to draw it ?
thank you for your reply!
-
May 5th, 2009, 04:12 AM
#4
Re: Change the shape of CEdit custom draw?
I'm sure you can find samples on the web. Consider this: http://www.codeguru.com/cpp/v-s/devs...icle.php/c8491.
-
May 5th, 2009, 04:15 AM
#5
Re: Change the shape of CEdit custom draw?
WM_PAINT is irrelevant as Edit draws on WM_NCPAINT (see source code of Edit control...)
Just use regions
-
May 5th, 2009, 04:39 AM
#6
Re: Change the shape of CEdit custom draw?
Originally Posted by carl666
... (see source code of Edit control...)
Please, provide a link to the "source code of Edit control"!
Victor Nijegorodov
-
May 6th, 2009, 04:16 AM
#7
Re: Change the shape of CEdit custom draw?
I've tested using regions.. but.. it doesnt work
any help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|