Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTFlatEdit background color
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTFlatEdit background color

 Post Reply Post Reply
Author
Message
souren View Drop Down
Newbie
Newbie
Avatar

Joined: 05 February 2008
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote souren Quote  Post ReplyReply Direct Link To This Post Topic: CXTFlatEdit background color
    Posted: 06 February 2008 at 3:17am
I want to make CXTFlatEdit control with black background and green text color. What is the correct way of doing that?
If I override OnCtlColor and return black brush I only got black text color for the typed text, the rest is default white.

Also tried to create class and use SetTheme for control
class CXTFlatEditThemeLogWindow : public CXTThemeManagerStyle   

and override RefreshMetrics but then realized it doesn't have any member for background color.


Please advise.
Thanks
Back to Top
souren View Drop Down
Newbie
Newbie
Avatar

Joined: 05 February 2008
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote souren Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2008 at 7:42am
Any ideas?
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2008 at 1:12pm

Hi,

you need catch WM_CTLCOLOR of parent window. See MSDN it has sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
souren View Drop Down
Newbie
Newbie
Avatar

Joined: 05 February 2008
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote souren Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2008 at 1:19pm
That's what I have done as mentioned above.
However, all I got is just black background for the typed text, not for the whole client area of control.
Perhaps the other option would be to derive class from CXTFlatEdit and override onpaint.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.