Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Themed horizontal scrollbar?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Themed horizontal scrollbar?

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


Joined: 02 April 2006
Location: China
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote shineryu Quote  Post ReplyReply Direct Link To This Post Topic: Themed horizontal scrollbar?
    Posted: 19 February 2009 at 8:32am
In ReportSample, we have a themed vertical scrollbar, but the horizontal scrollbar is not themed!
 
Can I have a Themed horizontal scrollbar?
 
Back to Top
shineryu View Drop Down
Groupie
Groupie


Joined: 02 April 2006
Location: China
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote shineryu Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2009 at 11:22pm
No reply?
I modified ReportSample, and I get below:
 
 
Very nice!
Only added about ten lines of code!
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: 20 February 2009 at 4:09pm
Very good - could you share this modifications with everybody? Should we modify Report Core for this case or app-level modifications is enough?
Back to Top
shineryu View Drop Down
Groupie
Groupie


Joined: 02 April 2006
Location: China
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote shineryu Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2009 at 6:04am
I suggest codejock modify its core, and it's very simple!
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: 22 February 2009 at 1:37pm
Right - it is simple and it's works. We will update our samples. Thanks!
Back to Top
securigy View Drop Down
Groupie
Groupie


Joined: 23 November 2007
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote securigy Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2009 at 7:21pm
I tried to use this sample, however my CReportControl::CXTPReportCtrl is placed directly on the dialog so I had to change the code since I dont have a View. Unfortunately, vertical scroll bar did not change, and horizonal bar not displayed at all... Any ideas?
 

void CReportControl::SetScrollBarStyle(XTPScrollBarStyle scrollStyle)

{

m_wndVScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_VERT, CRect(0, 0, 0, 0), this, 100);

m_wndVScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark);

m_wndHScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_HORZ, CRect(0, 0, 0, 0), this, 100);

m_wndHScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark);

CXTPScrollBar* pVScrollBar = (CXTPScrollBar*)GetScrollBarCtrl(SBS_VERT);

CXTPScrollBar* pHScrollBar = (CXTPScrollBar*)GetScrollBarCtrl(SBS_HORZ);

pVScrollBar = &m_wndVScrollBar;

pHScrollBar = &m_wndHScrollBar;

}

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: 02 April 2009 at 11:58pm
Who is the owner of m_wndVScrollBar  and m_wndHScrollBar? Dialog? You need to call ScrollBar assignment operator - not just pointer = ...
 
Example:
in header file

CXTPCommandBarScrollBarCtrl m_wndVScrollBar;

CXTPCommandBarScrollBarCtrl m_wndHScrollBar;

in implementation
 
m_wndVScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_VERT, CRect(0, 0, 0, 0), this, 100);

m_wndVScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark);

SetScrollBarCtrl(&m_wndVScrollBar); // againg - set for View!

m_wndHScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_HORZ, CRect(0, 0, 0, 0), this, 100);

m_wndHScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark);

It works and both bars theme-enabled.
 
Should be similar in dialog
Back to Top
securigy View Drop Down
Groupie
Groupie


Joined: 23 November 2007
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote securigy Quote  Post ReplyReply Direct Link To This Post Posted: 03 April 2009 at 4:15am
Originally posted by mdoubson mdoubson wrote:

Who is the owner of m_wndVScrollBar  and m_wndHScrollBar? Dialog? You need to call ScrollBar assignment operator - not just pointer = ...
 
Example:
in header file

CXTPCommandBarScrollBarCtrl m_wndVScrollBar;

CXTPCommandBarScrollBarCtrl m_wndHScrollBar;

in implementation
 
m_wndVScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_VERT, CRect(0, 0, 0, 0), this, 100);

m_wndVScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark);

SetScrollBarCtrl(&m_wndVScrollBar); // againg - set for View!

m_wndHScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_HORZ, CRect(0, 0, 0, 0), this, 100);

m_wndHScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark);

It works and both bars theme-enabled.
 
Should be similar in dialog
 
the owner of the scrollbar is CReportControl::CXTpReportCtrl and there is no SetScrollBar method in XTPReportCtrl - I dont have a view since CReportControl is a member of a dialog... that's exactly what my problem was... how do I go about it? I also did not realize that scrollbars should be of CXTPCommandBarScrollBarCtrl and not CXTScrollBar...
 
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: 03 April 2009 at 7:20pm

Make some research about Dialogs and Scrollbars - e.g. in CodeProject

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: 18 May 2009 at 6:43pm
 
The problems with scrollbar and Office2007 theme is not related to Report Control - see snapshot from Skin Sample app
 
 
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.125 seconds.