Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - ReportControl scrollbars draw problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportControl scrollbars draw problem

 Post Reply Post Reply
Author
Message
mihey View Drop Down
Groupie
Groupie
Avatar

Joined: 14 May 2003
Location: Germany
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mihey Quote  Post ReplyReply Direct Link To This Post Topic: ReportControl scrollbars draw problem
    Posted: 01 March 2017 at 8:40am
Hi everyone,

I'm having a problem with CXTPReportControl scrollbars used inside of CXTPResizePropertySheet page.

By any reason scrollbars are not drawn properly if I switch between pages.

See on the screenshot:



It looks like a typical re-draw problem. If I do a resize or move columns, everything appears correct with scrollbars.

I've tried to workaround the problem using AdjustScrollBars() or RedrawControl() methods inside of Page::OnSetActive() handler but without any success .

Does anyone have any idea or a suggestion?

Best regards,
Mikhail

XTP 17.3 MFC VC++7.1 (2003), Win7 x64
Back to Top
mihey View Drop Down
Groupie
Groupie
Avatar

Joined: 14 May 2003
Location: Germany
Status: Offline
Points: 45
Post Options Post Options   Thanks (1) Thanks(1)   Quote mihey Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2017 at 9:32am
Hi,

I just found out, that the problem has something to do with SetThemextpReportThemeOffice2013 theme.

For me it looks now like a bug. It even can be reproduced with ReportDialog sample in XTP 17.3.

You only have to add some more records and call
m_wndReportCtrl.SetTheme(xtpReportThemeOffice2013, TRUE);

after all. You'll see that the scrollbar is missing.


Best regards,
Mikhail
Back to Top
mihey View Drop Down
Groupie
Groupie
Avatar

Joined: 14 May 2003
Location: Germany
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mihey Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2017 at 8:10am
Hi,

a workaround for the problem at the moment is to do not use WS_EX_STATICEDGE style for the control, but I'm not very satisfied with it.

Best regards,
Mikhail
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2017 at 10:01am
Hello Mihey,

Problem in method CXTPReportThemeOffice2013::DrawWindowFrame()
I can advice to using SetScrollInfo() to update scrollBars
void CXTPReportThemeOffice2013::DrawWindowFrame(CDC* pDC, CRect rcWindow)
{
    if (::IsWindow(m_pControl->GetSafeHwnd()))
    {
        if (m_pControl->GetExStyle() & WS_EX_STATICEDGE)
        {
            pDC->Draw3dRect(rcWindow, m_clrBtnFace, m_clrBtnFace);
            
            SCROLLINFO  si;
            si.cbSize = sizeof(SCROLLINFO);
            m_pControl->GetScrollInfo(SB_VERT, &si, SIF_ALL);
            m_pControl->SetScrollInfo(SB_VERT, &si); // Note: Causes an OnSize message
            m_pControl->GetScrollInfo(SB_HORZ, &si, SIF_ALL);
            m_pControl->SetScrollInfo(SB_HORZ, &si); // Note: Causes an OnSize message
        }
        else
        {
            CXTPReportPaintManager::DrawWindowFrame(pDC, rcWindow);
        }
    }
}

Regards,
 Oleksandr Lebed
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.137 seconds.