Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Scrollbars, themes, and Form Views
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Scrollbars, themes, and Form Views

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

Joined: 08 September 2006
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnCrenshaw Quote  Post ReplyReply Direct Link To This Post Topic: Scrollbars, themes, and Form Views
    Posted: 03 October 2006 at 11:40am
I have a basic CXTResizeFormView in my program. I have it set to resize down to 300x200 pixels minimun and then show a scroll bar. The problem I have is that the scrollbar doesn't take the theme when it comes up. Here is what I have observed:
 
1. If the scrollbar is needed when my formview first comes up, it has the theme.
2. If the scrollbar is painting with the theme and I size the window in a way that affects the scrollbar (I.E. vertical bar, moving bottom edge), it reverts to the basic windows bar.
3. Once the bar looses the theme, switching away and back (thereby forcing a WM_PAINT message) does NOT cause it to paint right.
4. Each of the three pieces of the scrollbar (each arrow and the thumbar) refreshes independantly once it is used. It is therefore possible to have a half-skinned scrollbar (for example an arrow and thumbar painted right, and the remaining arrow painted by windows.)
5. Switching away and back also causes the bar to revert.
 
First, Could this bug be fixed.
 
Second, Is there a possible workaround that I can use?
 
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2006 at 12:32am
Hello, yes, it is known bug of OS. as workaround in our samples we removing scrolbars for forms at all:
 
void CSimpleForm::OnInitialUpdate()
{
 CFormView::OnInitialUpdate();
 SetScaleToFitSize(CSize(1, 1));
 ModifyStyle(0, WS_CLIPCHILDREN|WS_CLIPSIBLINGS);
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ingo View Drop Down
Newbie
Newbie


Joined: 10 March 2006
Location: Germany
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ingo Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2006 at 10:58am
Hi,

I use a workaround for the scrollbar problem: I place the CXTResizeFormView in a CMDIChildWnd with a CXTSplitterWnd. One splitter view contains the form view and the other splitter view contains a dummy dialog and has a size of 0. The drawback is the gripper that appears as a thicker border at the bottom.

However, in version 9.81 resizing worked this way. In version 10.3.1 it's possible to resize the dialog smaller than it's original size. I have a list control sizing in both directions and a list of buttons keeping their positions to the right of it. The list can be resized smaller than the button list. So the list fits the window size, but scrollbars appear to reach the buttons...

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.047 seconds.