Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPControlEdit background color
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControlEdit background color

 Post Reply Post Reply
Author
Message
GARC View Drop Down
Newbie
Newbie


Joined: 07 October 2011
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote GARC Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlEdit background color
    Posted: 07 October 2011 at 9:29am
I have an application with a simple Ribbon Bar in which I´ve placed two CXTControl of type CXTPControlEdit.
This Ribbon Bar has two operation modes: DISPLAY and EDITION. The DISPLAY mode is used to show the current contents of these controls (text), but they are set in ReadOnly state so cannot be modified. The EDITION mode is obviously prepared to set these controls out of ReadOnly state allowing the user to make changes to them.
My problem is that when set to ReadOnly state, the graphical aspect of them does not change, only changes the behaviour from editable to non-editable. My customer wants these controls to change their aspect when in DISPLAY mode, for example to show a grayed background, in order to notice that they are not editable.
I´ve tried to derive a class from CXTPControlEdit with a boolean member variable to set the editable mode and I´ve overriden the virtual function Draw to change that color without success.
I even don´t know if I should use any CXTPPaintManager to do that because in fact, I don´t know which is the function of that CXTPPaintManager inside Codejock´s structure.
CXTPControl has a function called GetPaintManager, but inside CXTPPaintManager, although there is a function to get the back color of the edit (GetControlEditBackColor), there is none to Set this color.
Some help will be appreciated.
Thanks.
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.141 seconds.