Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem scrolling owner-drawn listbox

47 views
Skip to first unread message

Andreas Hansson

unread,
Oct 14, 2008, 12:33:12 PM10/14/08
to
I am having problems scrolling an owner-drawn listbox. When scrolling with
the mouse wheel I get a really weird effect, like it is scrolling the wrong
way, then stopping at the right place. I found a KB article describing
something similar, but it's very old; I can't believe this problem would
still be there, not fixed and with no workaround available. There's also a
discrepancy from the article. I see the problem only when scrolling with the
mouse scroll wheel, not when dragging the scroll bar. The article in
question is: http://support.microsoft.com/kb/890764

An example project reproducing the error on my computer is available at:
http://filer.briljant.se/filer/temp/testlistboxscroll.zip

I am running on Windows XP, service pack 3. The mouse I am using is a
Logitech MX 1000.

Requiring that my customers disable smooth scrolling system-wide seems like
an unreasonable demand for a single piece of software.

Grateful for any help,
Andreas Hansson


Jialiang Ge [MSFT]

unread,
Oct 15, 2008, 2:54:06 AM10/15/08
to
Good morning Mr. Hansson. Thank you for using Newsgroup support service. My
name is Jialiang Ge [MSFT]. It's my pleasure to work with you on this issue.

It's a very sharp and acute observation that the scrolling problem in an
owner-drawn listbox is caused by the product issue documented at
http://support.microsoft.com/kb/890764
Although the article provides two workarounds by turning off the
smooth-scroll feature either manually or programmatically, I fully
understand your concerns that this kind of system-wide setting is demanding
for a single software. I thus queried our support database, and found
another workaround which was mentioned as "application-wide". However, it's
a little strange that when I apply the solution to your attached project,
the compatibility setting does not take effect and the listbox still has
the scrolling problem. Mr. Hansson, I quote the mentioned solution here,
and I am consulting the issue owner about the reason. Please let me know
whether this kind of app-wide solution can fit your need or not. Thanks.

=======
Rather than globally turning off list box smooth scrolling by calling
SystemParametersInfo, we could disable it in the affected application with
the GACF_NOSMOOTHSCROLLING appcompat flag. The workaround is to add a
string value [Application Name] under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Compatibility32 and set it to "0x40000000". The registry
value name is the name of the executable that you want to apply the
application compatibility setting to. For example, if the executable file
is TEST.EXE, then the registry value name will be TEST. The developers
could write the value into the registry during setup.
=======

P.S. I also confirmed that the product issue
(http://support.microsoft.com/kb/890764) does not appear in Windows Vista.

Regards,
Jialiang Ge (jia...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jialiang Ge [MSFT]

unread,
Oct 16, 2008, 11:43:53 AM10/16/08
to
Dear Mr. Hansson

I figure out that the app-wide workaround mentioned in my last reply only
applies to USER32 list box implementation. The attached project is written
in VB.net which uses COMCTL32 V6 list box. Although COMCTL32 V6 list box is
based on the USER32 implementation, it doesn't check the app compat flag
that we set in the Compatibility32 registry. A workaround is to disable
Visual Styles of the .NET app. This can force the executable to use the
USER32 list box.

To disable Visual Styles:
For VB.NET projects, please open the project's Property page. In the
Application tab, uncheck the "XP Visual Styles" option.
For C# projects, please remove the line "Application.EnableVisualStyles();"
in Program.Main method.

I have tested the solution in your attached sample, and the scrolling of
listbox appears to work well. However, the side effect of this solution is
that, the app will lose the visual styles of modern operating systems. Mr.
Hansson, please let me know if you have concerns on it.

By the way, because this issue has been confirmed as a product issue of
Microsoft, please feel free to contact Microsoft Customer Support Service
(CSS) department to create a support incident. The incident will be free of
charge.

Regards,
Jialiang Ge (jia...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Andreas Hansson

unread,
Oct 20, 2008, 8:29:36 AM10/20/08
to
Just want to keep you up to date; I have been out of office a few days. I
should have time to experiment further with the solutions you proposed this
week.

Do you think opening a support case for this will actually be useful? It
seems you are already offering me a lot of help, and I am a bit doubtful
that they would fix any of this in the old operating systems at this point.

Andreas Hansson


Jialiang Ge [MSFT]

unread,
Oct 21, 2008, 1:30:34 AM10/21/08
to
Dear Mr. Hansson

> Do you think opening a support case for this will actually be useful? It
> seems you are already offering me a lot of help, and I am a bit doubtful
> that they would fix any of this in the old operating systems at this
> point.

I wanted to provide as many options as possible for your references.If the
app-wide workaround can already meet your need, I do not think it is
necessary to create a support incident. But if you still have concerns on
the workaround because of its side effect, I'd suggest CSS department. They
may consider a fix according to the business impact.

Have a very nice day!

Regards,
Jialiang Ge (jia...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================


"Andreas Hansson" <ad...@newsgroup.nospam> wrote in message
news:%237C4F%23qMJH...@TK2MSFTNGP04.phx.gbl...

0 new messages