![]() |
CFormView and ScrollBars |
Post Reply
|
| Author | |
AliRafiee
Groupie
Joined: 06 May 2004 Status: Offline Points: 32 |
Post Options
Thanks(0)
Quote Reply
Topic: CFormView and ScrollBarsPosted: 06 May 2004 at 4:10pm |
|
Hi, I have an MDI application, trying to use Office2003 theme. The application's View is a CXTTabView, and in the OnInitialUpdate I add a couple of views (CFormView) to the CXTTabView. If I resize the view so that the scrollbars show up, they flicker between gray and blue scrollbars, once I stop it displays the gray ones until I click on each part of the scroll bars, and at that point it redraws them in blue. What am I doing wrong here? Thanks Ali |
|
![]() |
|
LarryWaugh
Newbie
Joined: 25 May 2004 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 November 2004 at 3:52pm |
|
This is a very ANNOYING problem. Does CodeJock have any input on this situation??
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 November 2004 at 11:32pm |
|
it is OS xp bug. Remove scrollbars: void CSimpleForm::OnInitialUpdate() |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
LarryWaugh
Newbie
Joined: 25 May 2004 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 November 2004 at 8:26am |
|
Adding SetScaleToFitSize(CSize(0)); causes a Debug Assertion Failed in wingdi.cpp at line 454. This is a CXTResizeFormView derived class in a CXTSplitterWnd. |
|
![]() |
|
AliRafiee
Groupie
Joined: 06 May 2004 Status: Offline Points: 32 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 November 2004 at 10:05am |
|
Larry Change the line to SetScaleToFitSize(CSize(1,1)); to get rid of the asserts, but doesn't solve the problem, it looks like a microsoft bug!
Oleg, For me that doesn't solve the problem, it just simply hids the scrollbar.
|
|
![]() |
|
robin_l
Senior Member
Joined: 15 October 2006 Status: Offline Points: 117 |
Post Options
Thanks(1)
Quote Reply
Posted: 05 May 2007 at 9:44am |
|
I've struggled with this for a long time and have come up with a solution that others might find useful. It seems that if you set the WS_VSCROLL and WS_HSCROLL styles then this ensures the themed scrollbars are used. However, you need to then ensure that these flags are restored to the original values (or resizing doesn't work properly). In your OnInitialUpdate code add the following before you do anything else:
|
|
![]() |
|
countersa08
Newbie
Joined: 23 June 2007 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 June 2007 at 11:12pm |
|
Thank you for this solution. It fixed my problem too!
|
|
![]() |
|
tomay3000
Groupie
Joined: 08 December 2010 Location: Algeria Status: Offline Points: 56 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 October 2013 at 9:58pm |
|
nice trick ;)
this also could work:
|
|
|
Product: Codejock ToolkitPro MFC v16.2.0
Platform: Microsoft Windows 8 Pro (64-bit) Language: Microsoft Visual C++ v6.0 (MFC) |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |