Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - how to set the bkcolor of header if it is pressed
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to set the bkcolor of header if it is pressed

 Post Reply Post Reply
Author
Message
yangyanhui View Drop Down
Groupie
Groupie


Joined: 20 August 2020
Status: Offline
Points: 87
Post Options Post Options   Thanks (0) Thanks(0)   Quote yangyanhui Quote  Post ReplyReply Direct Link To This Post Topic: how to set the bkcolor of header if it is pressed
    Posted: 02 December 2020 at 2:57am
HI,I have a CXTPREPORTCTRL. When I pressed on the header of it,the background color of the header will be shown in yellow. I want to keep it as the same color as it is when it is not pressed. How can I realize it?I have not find the color to set in XTPPaintManager.
thanks
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1138
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2020 at 3:55am
Did you overwrite GetItemMetrics()?
In my case I can't see yellow colors in header.
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
yangyanhui View Drop Down
Groupie
Groupie


Joined: 20 August 2020
Status: Offline
Points: 87
Post Options Post Options   Thanks (0) Thanks(0)   Quote yangyanhui Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2020 at 4:11am
I have overwriten GetItemMetrics in report data and it works good. I do not know how to use it in header rows
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 598
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2020 at 8:26am
It is much easier to use the themes to change the colors in your application consistently. Most of the CodeJock sample projects are using this approach.

Basically set the handle:

XTPResourceImages()->SetHandle(_T("Office2016.dll"), _T("Office2016PowerPointDarkGray.ini"));
CXTPPaintManager::SetTheme(xtpThemeOffice2013);
SendMessageToDescendants(WM_XTP_SETCONTROLTHEME, xtpControlThemeOffice2013);

and specify the control theme:

SetTheme(xtpReportThemeOffice2013, TRUE);

You can then play with the color definitions in Office2016PowerPointDarkGray.ini in the project:

XTToolkit\v19.1.0\Source\Styles\Office2016

compile it and use it in your application.
Product: Xtreme ToolkitPro (19.1.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
yangyanhui View Drop Down
Groupie
Groupie


Joined: 20 August 2020
Status: Offline
Points: 87
Post Options Post Options   Thanks (0) Thanks(0)   Quote yangyanhui Quote  Post ReplyReply Direct Link To This Post Posted: 03 December 2020 at 3:33am
as codejock set,when the header of a xtpreport is pressed, it will change color. I do not want this function. How can I cancel the function?
thanks
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.