Discussion:
Possible bug in Vista with non-client scrollbar rendering
(too old to reply)
Jon Potter
2007-02-08 23:10:10 UTC
Permalink
Raw Message
Hi,

We've discovered what would seem to be a bug with the new "fading"
scrollbars in Vista.

If the horizontal or vertical scrollbars are removed from a window _while_
they in the process of fading out, the system can sometimes draw the
scrollbar over the top of the client area once the fade-out timer elapses.

I have put example source code + a demonstration program online at
http://bytebounce.com/file/295/30a66/vistascrollbarbug.zip

To repeat the problem, position the mouse over one or other of the
scrollbars to make the scrollbar fade in. Then move the mouse off the
scrollbar to make it fade out, and immediately (while the fade out is still
occurring), press the appropriate key (as given in the instructions
displayed in the main window of the demo program) to turn that scrollbar
off. More often than not, the scrollbar will disappear and then immediately
be redrawn over the top of the now-resized client area.

The question I have is, is this a known bug, and are there any workarounds?

Regards,
Jonathan Potter
James Brown
2007-02-08 23:33:05 UTC
Permalink
Raw Message
Post by Jon Potter
Hi,
We've discovered what would seem to be a bug with the new "fading"
scrollbars in Vista.
If the horizontal or vertical scrollbars are removed from a window _while_
they in the process of fading out, the system can sometimes draw the
scrollbar over the top of the client area once the fade-out timer elapses.
I have put example source code + a demonstration program online at
http://bytebounce.com/file/295/30a66/vistascrollbarbug.zip
To repeat the problem, position the mouse over one or other of the
scrollbars to make the scrollbar fade in. Then move the mouse off the
scrollbar to make it fade out, and immediately (while the fade out is
still occurring), press the appropriate key (as given in the instructions
displayed in the main window of the demo program) to turn that scrollbar
off. More often than not, the scrollbar will disappear and then
immediately be redrawn over the top of the now-resized client area.
The question I have is, is this a known bug, and are there any
workarounds?
Regards,
Jonathan Potter
Looks like a bug (one of many). My suggested fixes are (take your pick)

1. Do a 'manual' KillTimer to prevent the WM_TIMER messages.
2. Subclass the window (if necessary) and process its WM_TIMER message -
'eat' them when there are no scrollbars displayed to prevent the
DefWindowProc from doing the animation.
3. Use SetWindowPos with SWP_FRAMECHANGED|SWP_DRAWFRAME in a vain attempt to
convince Windows that the scrollbars really have gone.

Worth a try I'd say.
--
James Brown
Microsoft MVP - Windows SDK
www.catch22.net
Free Win32 Tutorials and Sourcecode
Jon Potter
2007-02-09 00:36:23 UTC
Permalink
Raw Message
Hi James, thanks for the suggestions!
Post by James Brown
1. Do a 'manual' KillTimer to prevent the WM_TIMER messages.
2. Subclass the window (if necessary) and process its WM_TIMER message -
'eat' them when there are no scrollbars displayed to prevent the
DefWindowProc from doing the animation.
We did think of this but unfortunately neither are really practical for two
reasons. Firstly we don't "know" what the timer ID is (or is going to be),
and so can't kill it, and secondly, the timer seems to use a callback
function and so it never comes to our window procedure. We can't block the
timer in the message loop because our window is hosted by another
application and we don't have our own message loop to block it in!
Post by James Brown
3. Use SetWindowPos with SWP_FRAMECHANGED|SWP_DRAWFRAME in a vain attempt
to convince Windows that the scrollbars really have gone.
Good idea but doesn't make any difference :(

Cheers,
Jon
Walter Wang [MSFT]
2007-02-09 03:07:59 UTC
Permalink
Raw Message
Hi Jon,

Thank you very much for your feedback. I've been able to reproduce the
issue on Vista RTM when Aero Glass effect is turned on.

I've reported this to product team and I will discuss with them to see if
there's any workaround for now. Thank you for your patience and
understanding.

Sincerely,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

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://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Jon Potter
2007-02-09 03:17:33 UTC
Permalink
Raw Message
Thanks Walter!
Post by Walter Wang [MSFT]
I've reported this to product team and I will discuss with them to see if
there's any workaround for now. Thank you for your patience and
understanding.
Jon Potter
2007-02-14 12:43:53 UTC
Permalink
Raw Message
Hi Walter, just wondering if you had found anything out about this.

Thanks,
Jon
Post by Walter Wang [MSFT]
Hi Jon,
Thank you very much for your feedback. I've been able to reproduce the
issue on Vista RTM when Aero Glass effect is turned on.
I've reported this to product team and I will discuss with them to see if
there's any workaround for now. Thank you for your patience and
understanding.
Sincerely,
Microsoft Online Community Support
Walter Wang [MSFT]
2007-02-14 13:27:17 UTC
Permalink
Raw Message
Hi Jon,

Sorry for letting you wait.

I'm discussing this with product team. Unfortunately there's no workaround
for current moment. I've filed an internal bug for it for further
investigation. If you think this is important for your product and want to
know when we will fix it, please contact Microsoft Customer Support and
Service and refer me when our engineer contacts you, I will let the
engineer know the bug ID of this issue. Please note since this is a
confirmed issue, this service request should be free.

Regards,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Jon Potter
2007-02-24 20:38:11 UTC
Permalink
Raw Message
Hi Walter (and others),

Just wanted to report back that we have found an easy workaround for this.
From the developer:

"Calling SetScrollInfo seems to cancel the fade-out animation so if you call
SetScrollInfo before ShowScrollbar(...,FALSE) then you can work around the
bug.

Previously I only called SetScrollInfo for the scrollbars I wanted to (keep)
visible. I removed that check and now call it all the time and it seems to
have fixed the problem."


Regards,
Jonathan Potter
Post by Walter Wang [MSFT]
Hi Jon,
Sorry for letting you wait.
I'm discussing this with product team. Unfortunately there's no workaround
for current moment. I've filed an internal bug for it for further
investigation. If you think this is important for your product and want to
know when we will fix it, please contact Microsoft Customer Support and
Service and refer me when our engineer contacts you, I will let the
engineer know the bug ID of this issue. Please note since this is a
confirmed issue, this service request should be free.
Regards,
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Wang [MSFT]
2007-03-01 02:05:32 UTC
Permalink
Raw Message
Hi Jon,

Thank you for sharing your experience with the community. I've also
forwarded your information to the product team for reference. I'll keep you
posted if there's any updated information on this issue.

Regards,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Luke Skylwalker
2010-06-15 14:30:08 UTC
Permalink
Raw Message
Calling SetScrollInfo before ShowScrollBar doesn't work for me. I have found no workarounds. Walter, when guys from microsoft will fix their bug?



wawan wrote:

Hi Jon,Thank you for sharing your experience with the community.
28-Feb-07

Hi Jon

Thank you for sharing your experience with the community. I've also
forwarded your information to the product team for reference. I'll keep you
posted if there's any updated information on this issue

Regards
Walter Wang (***@online.microsoft.com, remove 'online.'
Microsoft Online Community Suppor

=================================================
When responding to posts, please "Reply to Group" via your newsreader s
that others may learn and benefit from your issue
=================================================

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

Previous Posts In This Thread:

On Thursday, February 08, 2007 6:10 PM
Jon Potter wrote:

Possible bug in Vista with non-client scrollbar rendering
Hi

We've discovered what would seem to be a bug with the new "fading"
scrollbars in Vista

If the horizontal or vertical scrollbars are removed from a window _while_
they in the process of fading out, the system can sometimes draw the
scrollbar over the top of the client area once the fade-out timer elapses

I have put example source code + a demonstration program online at
http://bytebounce.com/file/295/30a66/vistascrollbarbug.zi

To repeat the problem, position the mouse over one or other of the
scrollbars to make the scrollbar fade in. Then move the mouse off the
scrollbar to make it fade out, and immediately (while the fade out is still
occurring), press the appropriate key (as given in the instructions
displayed in the main window of the demo program) to turn that scrollbar
off. More often than not, the scrollbar will disappear and then immediately
be redrawn over the top of the now-resized client area

The question I have is, is this a known bug, and are there any workarounds

Regards
Jonathan Potter

On Thursday, February 08, 2007 6:33 PM
James Brown wrote:

Re: Possible bug in Vista with non-client scrollbar rendering
"Jon Potter" <***@nospam.nospam> wrote in message news:***@TK2MSFTNGP05.phx.gbl..

Looks like a bug (one of many). My suggested fixes are (take your pick

1. Do a 'manual' KillTimer to prevent the WM_TIMER messages
2. Subclass the window (if necessary) and process its WM_TIMER message -
'eat' them when there are no scrollbars displayed to prevent the
DefWindowProc from doing the animation
3. Use SetWindowPos with SWP_FRAMECHANGED|SWP_DRAWFRAME in a vain attempt to
convince Windows that the scrollbars really have gone

Worth a try I'd say

--
James Brow
Microsoft MVP - Windows SD
www.catch22.ne
Free Win32 Tutorials and Sourcecode

On Thursday, February 08, 2007 7:36 PM
Jon Potter wrote:

Hi James, thanks for the suggestions!
Hi James, thanks for the suggestions

"James Brown" <***@viahomepage.com> wrote in message news:iaidnYOR3-***@pipex.net..

We did think of this but unfortunately neither are really practical for two
reasons. Firstly we don't "know" what the timer ID is (or is going to be),
and so can't kill it, and secondly, the timer seems to use a callback
function and so it never comes to our window procedure. We can't block the
timer in the message loop because our window is hosted by another
application and we don't have our own message loop to block it in

Good idea but doesn't make any difference :

Cheers
Jon

On Thursday, February 08, 2007 10:07 PM
wawan wrote:

Hi Jon,Thank you very much for your feedback.
Hi Jon

Thank you very much for your feedback. I've been able to reproduce the
issue on Vista RTM when Aero Glass effect is turned on.

I've reported this to product team and I will discuss with them to see if
there's any workaround for now. Thank you for your patience and
understanding

Sincerely
Walter Wang (***@online.microsoft.com, remove 'online.'
Microsoft Online Community Suppor

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

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://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

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

On Thursday, February 08, 2007 10:17 PM
Jon Potter wrote:

Thanks Walter!
Thanks Walter!

On Thursday, February 08, 2007 10:30 PM
Alexander Grigoriev wrote:

Don't count on it fixed!
Don't count on it fixed! They have not fixed a similar bug in XP (failure to
redraw between horizontal and vertical scrollbars), known since beginning!

On Friday, February 09, 2007 11:54 AM
James Brown wrote:

Re: Possible bug in Vista with non-client scrollbar rendering
"Jon Potter" <***@nospam.nospam> wrote in message news:%23IwdQJ%***@TK2MSFTNGP05.phx.gbl...

ok.....but IIRC even a 'callback' timer will result in a message being sent
to the thread's message loop. Perhaps a message-hook or something similar?
Also is the timer ID constant? It's a shame to see more bugs introduced into
the UI over time, instead of it being improved as you'd expect.

How about this:

4. Install your own timer when you alter the scrollbars' visibility, and set
it so that it goes off after the animation delay built into Vista. When your
timer goes off do a manual redraw/whatever of the window. OK you'll get the
scrollbar appearing briefly but at least it'll vanish during your 'tidy up'.

5. Sublass the window and process WM_NCMOUSEMOVE messages (or whatever is
appropriate). Whenever you get one that indicates that the mouse is over the
scrollbar, *and* you have removed the scrollbar style, then 'eat' the
mouse-message to prevent the scrollbar from seeing it.

James
www.catch22.net

On Saturday, February 10, 2007 4:04 PM
Jon Potter wrote:

Re: Possible bug in Vista with non-client scrollbar rendering
Hi James,

"James Brown" <***@viahomepage.com> wrote in message news:***@pipex.net...

Unfortunately, because they're using a callback timer and we don't have our
own message loop, we don't get to see the WM_TIMER message ever. It never
arrives. A message hook might help with this I guess - it seems like an
awfully kludgy way of doing it though :(

Even if it did, the app plays an animation and the scrollbar would flicker
over the top of it as each frame was drawn.


We can't catch WM_NCMOUSEMOVE because the mouse has already moved and the
timer already been started by the time we know we need to hide the scrollbar
(this is triggered by the user clicking a button which causes the scrollbar
to be hidden.)

Thanks for trying though :)

Cheers,
Jon

On Sunday, February 11, 2007 4:32 AM
James Brown wrote:

Re: Possible bug in Vista with non-client scrollbar rendering
"Jon Potter" <***@nospam.nospam> wrote in message news:***@TK2MSFTNGP05.phx.gbl...

You don't need to see their WM_TIMER - the idea was to use your own with
SetTimer. You'll need to inject into their process of course...


Sure you can - you will see WM_NCMOUSEMOVE before the target window and
therefore prevent it from even starting the animation timer.
--
James Brown
Microsoft MVP - Windows SDK
www.catch22.net
Free Win32 Tutorials and Sourcecode

On Wednesday, February 14, 2007 7:43 AM
Jon Potter wrote:

Hi Walter, just wondering if you had found anything out about this.
Hi Walter, just wondering if you had found anything out about this.

Thanks,
Jon

On Wednesday, February 14, 2007 8:27 AM
wawan wrote:

Hi Jon,Sorry for letting you wait.I'm discussing this with product team.
Hi Jon,

Sorry for letting you wait.

I'm discussing this with product team. Unfortunately there's no workaround
for current moment. I've filed an internal bug for it for further
investigation. If you think this is important for your product and want to
know when we will fix it, please contact Microsoft Customer Support and
Service and refer me when our engineer contacts you, I will let the
engineer know the bug ID of this issue. Please note since this is a
confirmed issue, this service request should be free.

Regards,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

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

On Saturday, February 24, 2007 3:38 PM
Jon Potter wrote:

Hi Walter (and others),Just wanted to report back that we have found an easy
Hi Walter (and others),

Just wanted to report back that we have found an easy workaround for this.
From the developer:

"Calling SetScrollInfo seems to cancel the fade-out animation so if you call
SetScrollInfo before ShowScrollbar(...,FALSE) then you can work around the
bug.

Previously I only called SetScrollInfo for the scrollbars I wanted to (keep)
visible. I removed that check and now call it all the time and it seems to
have fixed the problem."


Regards,
Jonathan Potter

"Walter Wang [MSFT]" <***@online.microsoft.com> wrote in message news:***@TK2MSFTNGHUB02.phx.gbl...

On Wednesday, February 28, 2007 9:05 PM
wawan wrote:

Hi Jon,Thank you for sharing your experience with the community.
Hi Jon,

Thank you for sharing your experience with the community. I've also
forwarded your information to the product team for reference. I'll keep you
posted if there's any updated information on this issue.

Regards,
Walter Wang (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

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


Submitted via EggHeadCafe - Software Developer Portal of Choice
Entity Framework 4.0 POCO-First development and POCO Template
http://www.eggheadcafe.com/tutorials/aspnet/488279c4-214b-47ef-b152-955f3795ee13/entity-framework-40-poco.aspx
James Brown
2007-02-09 16:54:49 UTC
Permalink
Raw Message
Post by Jon Potter
Hi James, thanks for the suggestions!
Post by James Brown
1. Do a 'manual' KillTimer to prevent the WM_TIMER messages.
2. Subclass the window (if necessary) and process its WM_TIMER message -
'eat' them when there are no scrollbars displayed to prevent the
DefWindowProc from doing the animation.
We did think of this but unfortunately neither are really practical for
two reasons. Firstly we don't "know" what the timer ID is (or is going to
be), and so can't kill it, and secondly, the timer seems to use a callback
function and so it never comes to our window procedure. We can't block the
timer in the message loop because our window is hosted by another
application and we don't have our own message loop to block it in!
ok.....but IIRC even a 'callback' timer will result in a message being sent
to the thread's message loop. Perhaps a message-hook or something similar?
Also is the timer ID constant? It's a shame to see more bugs introduced into
the UI over time, instead of it being improved as you'd expect.

How about this:

4. Install your own timer when you alter the scrollbars' visibility, and set
it so that it goes off after the animation delay built into Vista. When your
timer goes off do a manual redraw/whatever of the window. OK you'll get the
scrollbar appearing briefly but at least it'll vanish during your 'tidy up'.

5. Sublass the window and process WM_NCMOUSEMOVE messages (or whatever is
appropriate). Whenever you get one that indicates that the mouse is over the
scrollbar, *and* you have removed the scrollbar style, then 'eat' the
mouse-message to prevent the scrollbar from seeing it.

James
www.catch22.net
Jon Potter
2007-02-10 21:04:59 UTC
Permalink
Raw Message
Hi James,
Post by James Brown
4. Install your own timer when you alter the scrollbars' visibility, and
set it so that it goes off after the animation delay built into Vista.
When your timer goes off do a manual redraw/whatever of the window. OK
you'll get the scrollbar appearing briefly but at least it'll vanish
during your 'tidy up'.
Unfortunately, because they're using a callback timer and we don't have our
own message loop, we don't get to see the WM_TIMER message ever. It never
arrives. A message hook might help with this I guess - it seems like an
awfully kludgy way of doing it though :(

Even if it did, the app plays an animation and the scrollbar would flicker
over the top of it as each frame was drawn.
Post by James Brown
5. Sublass the window and process WM_NCMOUSEMOVE messages (or whatever is
appropriate). Whenever you get one that indicates that the mouse is over
the scrollbar, *and* you have removed the scrollbar style, then 'eat' the
mouse-message to prevent the scrollbar from seeing it.
We can't catch WM_NCMOUSEMOVE because the mouse has already moved and the
timer already been started by the time we know we need to hide the scrollbar
(this is triggered by the user clicking a button which causes the scrollbar
to be hidden.)

Thanks for trying though :)

Cheers,
Jon
James Brown
2007-02-11 09:32:40 UTC
Permalink
Raw Message
Post by Jon Potter
Hi James,
Post by James Brown
4. Install your own timer when you alter the scrollbars' visibility, and
set it so that it goes off after the animation delay built into Vista.
When your timer goes off do a manual redraw/whatever of the window. OK
you'll get the scrollbar appearing briefly but at least it'll vanish
during your 'tidy up'.
Unfortunately, because they're using a callback timer and we don't have
our own message loop, we don't get to see the WM_TIMER message ever. It
never arrives. A message hook might help with this I guess - it seems like
an awfully kludgy way of doing it though :(
You don't need to see their WM_TIMER - the idea was to use your own with
SetTimer. You'll need to inject into their process of course...
Post by Jon Potter
Even if it did, the app plays an animation and the scrollbar would flicker
over the top of it as each frame was drawn.
Post by James Brown
5. Sublass the window and process WM_NCMOUSEMOVE messages (or whatever is
appropriate). Whenever you get one that indicates that the mouse is over
the scrollbar, *and* you have removed the scrollbar style, then 'eat' the
mouse-message to prevent the scrollbar from seeing it.
We can't catch WM_NCMOUSEMOVE because the mouse has already moved and the
timer already been started by the time we know we need to hide the
scrollbar (this is triggered by the user clicking a button which causes
the scrollbar to be hidden.)
Sure you can - you will see WM_NCMOUSEMOVE before the target window and
therefore prevent it from even starting the animation timer.
--
James Brown
Microsoft MVP - Windows SDK
www.catch22.net
Free Win32 Tutorials and Sourcecode
Alexander Grigoriev
2007-02-09 03:30:25 UTC
Permalink
Raw Message
Don't count on it fixed! They haven't fixed a similar bug in XP (failure to
redraw between horizontal and vertical scrollbars), known since beginning!
Post by Jon Potter
Hi,
We've discovered what would seem to be a bug with the new "fading"
scrollbars in Vista.
If the horizontal or vertical scrollbars are removed from a window _while_
they in the process of fading out, the system can sometimes draw the
scrollbar over the top of the client area once the fade-out timer elapses.
I have put example source code + a demonstration program online at
http://bytebounce.com/file/295/30a66/vistascrollbarbug.zip
To repeat the problem, position the mouse over one or other of the
scrollbars to make the scrollbar fade in. Then move the mouse off the
scrollbar to make it fade out, and immediately (while the fade out is
still occurring), press the appropriate key (as given in the instructions
displayed in the main window of the demo program) to turn that scrollbar
off. More often than not, the scrollbar will disappear and then
immediately be redrawn over the top of the now-resized client area.
The question I have is, is this a known bug, and are there any
workarounds?
Regards,
Jonathan Potter
Loading...