Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - color of selected focus item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

color of selected focus item

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: color of selected focus item
    Posted: 17 December 2009 at 9:10am
Hello,

How can i change the background color of the selected focus item.

if a row is selected, and item has not the focus, the background color
has pPaintManager->m_clrSelectedRow; color.

But there is no color for focus item. how can i change it.

Thanks
   Jimmy

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2009 at 5:52pm
smth like this:

ON_NOTIFY(XTP_NM_REPORT_FOCUS_CHANGING, XTP_ID_REPORT_CONTROL, OnFocusChanged)

void
CReportSampleView::OnFocusChanged(NMHDR* pNotifyStruct, LRESULT* result) {

if (pNotifyStruct) {

XTP_NM_REPORTREQUESTEDIT* pnm = (XTP_NM_REPORTREQUESTEDIT*) pNotifyStruct;

if (m_pRecItem) m_pRecItem->SetBackgroundColor(RGB(255,255,255));

if (pnm->pItem) {

pnm->pItem->SetBackgroundColor(RGB(255,128,128));

m_pRecItem = pnm->pItem;

} } }

where CXTPReportRecordItem* m_pRecItem; set as NULL initially
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.203 seconds.