Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. scrollview issue on win7 environment

scrollview issue on win7 environment

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studiocsharpdesignxml
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Ghost Employee
    wrote on last edited by
    #1

    We are currently maintaining a Windows application (MFC). Which retrieves data from an XML files. The XML file contains large data to display the UI components which are created dynamically in the CScrollView window or class. Under Windows XP platform the UI components can be created dynamically and displayed in the CScrollView properly. The UI components are so large. 504 components to be exact. These contains buttons, labels, edit box, spinners, comboboxes and others. The window or screen does not get corrupted or destroyed. The vertical scollbar works properly. But under Windows 7 platform, the UI components are not displayed properly. When it reach to a certain group no, the groups are overlapping other groups resulting to a bad display. The vertical scroller or scrollbar does not work properly. I already tried comparing the values that holds the sizes and ranges for scroll member variables but so far they have similar values. This program had already handled the above 32k range scroll range issue. We are currently maintaining this project in a Visual Studio 2005 C++ project (IDE).

    N 1 Reply Last reply
    0
    • G Ghost Employee

      We are currently maintaining a Windows application (MFC). Which retrieves data from an XML files. The XML file contains large data to display the UI components which are created dynamically in the CScrollView window or class. Under Windows XP platform the UI components can be created dynamically and displayed in the CScrollView properly. The UI components are so large. 504 components to be exact. These contains buttons, labels, edit box, spinners, comboboxes and others. The window or screen does not get corrupted or destroyed. The vertical scollbar works properly. But under Windows 7 platform, the UI components are not displayed properly. When it reach to a certain group no, the groups are overlapping other groups resulting to a bad display. The vertical scroller or scrollbar does not work properly. I already tried comparing the values that holds the sizes and ranges for scroll member variables but so far they have similar values. This program had already handled the above 32k range scroll range issue. We are currently maintaining this project in a Visual Studio 2005 C++ project (IDE).

      N Offline
      N Offline
      Newbie00
      wrote on last edited by
      #2

      Hello, What does it mean: "The vertical scroller or scrollbar does not work properly"? Does it mean you cannot use it? Is it disabled? or just screen is not refreshed properly? If I understood the effect on Win7: "overlapping controls" maybe the problem is with graphics card? I know cases from my application, that on some poor graphics cards on Win7 with AERO turned on scrolling rows containing many editable controls caused strange screen effects. The solution was to update graphics card driver or turn the AERO off. It helped in all cases.

      G 1 Reply Last reply
      0
      • N Newbie00

        Hello, What does it mean: "The vertical scroller or scrollbar does not work properly"? Does it mean you cannot use it? Is it disabled? or just screen is not refreshed properly? If I understood the effect on Win7: "overlapping controls" maybe the problem is with graphics card? I know cases from my application, that on some poor graphics cards on Win7 with AERO turned on scrolling rows containing many editable controls caused strange screen effects. The solution was to update graphics card driver or turn the AERO off. It helped in all cases.

        G Offline
        G Offline
        Ghost Employee
        wrote on last edited by
        #3

        I think its not from the graphics card since it should only display texts. The vertical scroller is still good at the first few groups but when it reaches to a certain group, all the remaining groups are displayed at the same place overlapping each other. At first, we thought that it reached the maximum scroll range but the thing is, We already had a method that handles that exception and it worked fine in win xp environment but not in win 7.

        N 1 Reply Last reply
        0
        • G Ghost Employee

          I think its not from the graphics card since it should only display texts. The vertical scroller is still good at the first few groups but when it reaches to a certain group, all the remaining groups are displayed at the same place overlapping each other. At first, we thought that it reached the maximum scroll range but the thing is, We already had a method that handles that exception and it worked fine in win xp environment but not in win 7.

          N Offline
          N Offline
          Newbie00
          wrote on last edited by
          #4

          In my case there were just texts too. The problem was not with advanced 3d graphics, but with srolling many controls containing simple texts. 8 columns and 20 rows each filled with one control, scrolled on Win7 with Aeoro turned on on some Intel grapcics chipset caused overlapping. Could you show us this special method? What does it do, that problem is solved for Win XP? Maybe some methods are not supported by Win7. Or Win7 uses other dlls version, which are not good for your solution from WinXp.

          G 2 Replies Last reply
          0
          • N Newbie00

            In my case there were just texts too. The problem was not with advanced 3d graphics, but with srolling many controls containing simple texts. 8 columns and 20 rows each filled with one control, scrolled on Win7 with Aeoro turned on on some Intel grapcics chipset caused overlapping. Could you show us this special method? What does it do, that problem is solved for Win XP? Maybe some methods are not supported by Win7. Or Win7 uses other dlls version, which are not good for your solution from WinXp.

            G Offline
            G Offline
            Ghost Employee
            wrote on last edited by
            #5

            BOOL CMyScrollView::OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll) { SCROLLINFO info; info.cbSize = sizeof(SCROLLINFO); info.fMask = SIF_TRACKPOS; if (LOBYTE(nScrollCode) == SB_THUMBTRACK) { GetScrollInfo(SB_HORZ, &info); nPos = info.nTrackPos; } if (HIBYTE(nScrollCode) == SB_THUMBTRACK) { GetScrollInfo(SB_VERT, &info); nPos = info.nTrackPos; } return CScrollView::OnScroll(nScrollCode, nPos, bDoScroll); } This method could be found on MSDN site which we also used. It handles the above 32k range for scrollview. One thing that I also noticed is the SB_THUMBTRACK in win7 is that, it was much bigger compared in the XP and Vista Environment. My thought is that if the SB_THUMBTRACK size varies the size of the scrollview, is it possible that some default value in win7 environment affects the maximum scrollsize range?

            1 Reply Last reply
            0
            • N Newbie00

              In my case there were just texts too. The problem was not with advanced 3d graphics, but with srolling many controls containing simple texts. 8 columns and 20 rows each filled with one control, scrolled on Win7 with Aeoro turned on on some Intel grapcics chipset caused overlapping. Could you show us this special method? What does it do, that problem is solved for Win XP? Maybe some methods are not supported by Win7. Or Win7 uses other dlls version, which are not good for your solution from WinXp.

              G Offline
              G Offline
              Ghost Employee
              wrote on last edited by
              #6

              I would like to know how did you resolve the problem in your case. I might wanna try since there is still no fix yet until now. This problem is so rare that no one could relate my situation.

              N 1 Reply Last reply
              0
              • G Ghost Employee

                I would like to know how did you resolve the problem in your case. I might wanna try since there is still no fix yet until now. This problem is so rare that no one could relate my situation.

                N Offline
                N Offline
                Newbie00
                wrote on last edited by
                #7

                Hello, In my case the problem was just with screen refreshing on Win7. Updating graphics card driver or turning Windows AERO off on user's computer solved the problem. So I think my case was different from yours. The only one thing is the same in our cases: WinXP worked fine, Win7 did not. If I undarstand your app correctly, you are creating many GDI objects (many Cwnd obj.). It is a surprise for me, because normally there is a limit for GDI in application. If you reach that limit, method: CWnd::Create() fails. The value of GDI count is written in Windows registry. Unfortunately I don't remember the regkey. But I think this also not your case, since you have got probles with controls overlapping from certain point of scroll pos. Maybe the problem is not with ScrollBar, but with scrolled out CScrollView. Maybe you have reached the end of CScrollView and your application is trying to draw all controls at the end of CScrollView? I think you can try to change your mechanics in app. Do something like this: Do not let your application to scroll View so far (above 32k). It is not necessary. Try to hide/delete controls, if are scrolled out from visible part of View and show/create controls, which has to be shown after scrolling.

                G 1 Reply Last reply
                0
                • N Newbie00

                  Hello, In my case the problem was just with screen refreshing on Win7. Updating graphics card driver or turning Windows AERO off on user's computer solved the problem. So I think my case was different from yours. The only one thing is the same in our cases: WinXP worked fine, Win7 did not. If I undarstand your app correctly, you are creating many GDI objects (many Cwnd obj.). It is a surprise for me, because normally there is a limit for GDI in application. If you reach that limit, method: CWnd::Create() fails. The value of GDI count is written in Windows registry. Unfortunately I don't remember the regkey. But I think this also not your case, since you have got probles with controls overlapping from certain point of scroll pos. Maybe the problem is not with ScrollBar, but with scrolled out CScrollView. Maybe you have reached the end of CScrollView and your application is trying to draw all controls at the end of CScrollView? I think you can try to change your mechanics in app. Do something like this: Do not let your application to scroll View so far (above 32k). It is not necessary. Try to hide/delete controls, if are scrolled out from visible part of View and show/create controls, which has to be shown after scrolling.

                  G Offline
                  G Offline
                  Ghost Employee
                  wrote on last edited by
                  #8

                  Thanks for the reply. I have tried monitoring the GDI and user objects in the task manager and found out that it only consumes about 30-50 GDI objects & 1.8k-7k user objects in the page that has the bug display. It hasn't reached yet the 10k limit for the user object so it might not be the cause of the GUI problem in the scrollview. I also tried increasing the limit of the user object around 18-20k but still no effect on the output. I really hope someone has a bugfix on this. (probably microsoft)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups