<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Larry Osterman's WebLog : Windows 7</title><link>http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx</link><description>Tags: Windows 7</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>What’s up with the Beep driver in Windows 7?</title><link>http://blogs.msdn.com/larryosterman/archive/2010/01/04/what-s-up-with-the-beep-driver-in-windows-7.aspx</link><pubDate>Mon, 04 Jan 2010 22:28:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9943625</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>30</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9943625.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9943625</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9943625</wfw:comment><description>&lt;p&gt;Earlier today, someone asked me why 64bit versions of windows don’t support the internal PC speaker beeps.&amp;#160; The answer is somewhat complicated and ends up being an interesting intersection between a host of conflicting tensions in the PC ecosystem.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let’s start by talking about how the Beep hardware worked way back in the day[1].&amp;#160; The original IBM PC contained an Intel 8254 programmable interval timer chip to manage the system clock.&amp;#160; Because the IBM engineers felt that the PC needed to be able to play sound (but not particularly high quality sound), they decided that they could use the 8254 as a very primitive square wave generator.&amp;#160; To do this, they programmed the 3rd timer on the chip to operate in Square Wave mode and to count down with the desired output frequency.&amp;#160; This caused the Out2 line on the chip to toggle from high to low every time the clock went to 0.&amp;#160; The hardware designers tied the Out2 line on the chip to the PC speaker and voila – they were able to use the clock chip to program the PC speaker to make a noise (not a very high quality noise but a noise nonetheless).&lt;/p&gt;  &lt;p&gt;The Beep() Win32 API is basically a thin wrapper around the 8254 PIC functionality.&amp;#160; So when you call the Beep() API, you program the 8254 to play sounds on the PC speaker.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Fast forward about 25 years…&amp;#160; The PC industry has largely changed and the PC architecture has changed with it.&amp;#160; At this point they don’t actually use the 8254 as the programmable interrupt controller, but it’s still in modern PCs.&amp;#160; And that’s because the 8254 is still used to drive the PC speaker.&amp;#160; &lt;/p&gt;  &lt;p&gt;One of the other things that happened in the intervening 25 years was that machines got a whole lot more capable.&amp;#160; Now machines come with capabilities like newfangled hard disk drives (some of which can even hold more than 30 &lt;em&gt;megabytes&lt;/em&gt; of storage (but I don’t know why on earth anyone would ever want a hard disk that can hold that much stuff)).&amp;#160; And every non server machine sold today has a PC sound card.&amp;#160; So every single machine sold today has two ways of generating sounds – the PC sound card and the old 8254 which is tied to the internal PC speaker (or to a dedicated input on the sound card – more on this later).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There’s something else that happened in the past 25 years.&amp;#160; PCs became commodity systems.&amp;#160; And that started exerting a huge amount of pressure on PC manufacturers to cut costs.&amp;#160; They looked at the 8254 and asked “why can’t we remove this?”&lt;/p&gt;  &lt;p&gt;It turns out that they couldn’t.&amp;#160; And the answer to why they couldn’t came from a totally unexpected place.&amp;#160; The &lt;a href="http://www.ada.gov/"&gt;American’s with Disabilities Act&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The ADA?&amp;#160; What on earth could the ADA have to do with a PC making a beep?&amp;#160;&amp;#160; Well it turns out that at some point in the intervening 25 years, the Win32 Beep() was used for assistive technologies – in particular the sounds made when you enable the assistive technologies like &lt;a href="http://en.wikipedia.org/wiki/Sticky_keys"&gt;StickyKeys&lt;/a&gt; were generated using the Beep() API.&amp;#160;&amp;#160; There are about 6 different assistive technology (AT) sounds built into windows, their implementation is plumbed fairly deep inside the win32k.sys driver.&amp;#160; &lt;/p&gt;  &lt;p&gt;But why does that matter?&amp;#160; Well it turns out that many enterprises (both governments and corporations) have requirements that prevent them from purchasing equipment that lacks accessible technologies and that meant that you couldn’t sell computers that didn’t have beep hardware to those enterprises.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This issue was first noticed when Microsoft was developing the first 64bit version of WIndows.&amp;#160; Because the original 64bit windows was intended for servers, the hardware requirements for 64bit machines didn’t include support for an 8254 (apparently the AT requirements are relaxed on servers).&amp;#160; But when we started building a client 64bit OS, we had a problem – client OS’s had to support AT so we needed to bring the beep back even on machines that didn’t have beep hardware.&lt;/p&gt;  &lt;p&gt;For Windows XP this was solved with some custom code in winlogon which worked but had some unexpected complications (none of which are relevant to this discussion).&amp;#160; For Windows Vista, I redesigned the mechanism to move the accessibility beep logic to a new “user mode system sounds agent”.&amp;#160; &lt;/p&gt;  &lt;p&gt;Because the only machines with this problem were 64bit machines, this functionality was restricted to 64bit versions of Windows.&amp;#160; &lt;/p&gt;  &lt;p&gt;That in turn meant that PC manufacturers still had to include support for the 8254 hardware – after all if the user chose to buy the machine with a 32bit operating system on it they might want to use the AT functionality.&lt;/p&gt;  &lt;p&gt;For Windows 7, we resolved the issue completely – we moved all the functionality that used to be contained in Beep.Sys into the user mode system sounds agent – now when you call the Beep() API instead of manipulating the 8254 chip the call is re-routed into a user mode agent which actually plays the sounds.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There was another benefit associated with this plan: Remember above when I mentioned that the 8254 output line was tied to a dedicated input on the sound card?&amp;#160; Because of this input to the sound card, the sound hardware needed to stay powered on at full power all the time because the system couldn’t know when an application might call Beep and thus activate the 8254 (there’s no connection between the 8254 and the power management infrastructure so the system can’t power on the sound hardware when someone programs the 3rd timer on the 8254).&amp;#160; By redirecting the Beep calls through the system audio hardware the system was able to put the sound hardware to sleep until it was needed.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This redirection also had had a couple of unexpected benefits.&amp;#160; For instance when you accidentally type (or grep) through a file containing 0x07 characters in it (like a .obj file) you can finally turn off the annoying noise – since the beeps are played through the PC speakers, the PC mute key works to shut them up.&amp;#160; It also means that you can now control the volume of the beeps.&amp;#160; &lt;/p&gt;  &lt;p&gt;There were also some unexpected consequences.&amp;#160; The biggest was that people started noticing when applications called Beep().&amp;#160; They had placed their PCs far enough away (or there was enough ambient noise) that they had never noticed when their PC was beeping at them until the sounds started coming out their speakers.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;[1] Thus providing me with an justification to keep my old Intel component data catalogs from back in the 1980s.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9943625" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Microsoft+History/default.aspx">Microsoft History</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Windows 7 Reflections…</title><link>http://blogs.msdn.com/larryosterman/archive/2009/10/23/windows-7-reflections.aspx</link><pubDate>Fri, 23 Oct 2009 17:53:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9912165</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>16</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9912165.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9912165</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9912165</wfw:comment><description>&lt;p&gt;Today[1] Microsoft formally launched Windows 7.&amp;#160; I can’t say how proud I am of the work we did in Windows 7 – it’s been an amazing journey.&amp;#160; This is the 4th version of Windows I’ve worked on and I have never felt this way about a release of Windows.&amp;#160; I have to admit that I get a bit weepy with pride whenever I see a Win7 commercial (Kylie is simply too cute :)).&amp;#160; &lt;/p&gt;  &lt;p&gt;I thought I’d write a bit about the WIn7 experience from my point of view.&amp;#160; I’ve written a bit of this stuff in &lt;a href="http://blogs.msdn.com/e7/archive/2008/10/15/engineering-7-a-view-from-the-bottom.aspx"&gt;my post on the Engineering 7 blog&lt;/a&gt; but that was more about the changes in engineering processes as opposed to my personal experiences in the process.&lt;/p&gt;  &lt;p&gt;For me, the Windows 7 work basically started just after we shipped Vista.&amp;#160; While the PMs and leads on the sound team were busy working on planning for Win7, I spent most of the time between Vista RTM and the start of the Win7 feature design cleaning up some of the Vista code I was responsible for.&amp;#160; During the final Vista testing, I realized that there were some architectural deficiencies in some of the sound code that caused some really subtle bugs (that I don’t believe anyone outside of the sound team has ever found) so I took the opportunity to clean up those deficiencies.&amp;#160; &lt;/p&gt;  &lt;p&gt;I also fixed an issue that occurred when someone called the wave APIs from their DLL entry point.&amp;#160; Yes I know that apps aren’t supposed to call any APIs from DllMain but anyone who’s read either my blog or Raymond Chen’s blog will realize that a lot of apps do stuff like that and get away with it.&amp;#160; This fix was actually first deployed in Vista SP1 – we had identified the DllMain problem before we shipped Vista and included a workaround for the problem but we also added some telemetry so we could determine the number of customers that were affected by the bug.&amp;#160; Based on that telemetry we decided that we had to include the fix in Vista SP1 of the number of users affected by the issue.&amp;#160; This is a perfect example of some of the ways that the customer experience improvement program directly leads to product improvements.&amp;#160; Before we had the CEIP, we would have had no way of knowing how much impact the bug had on customers, the CEIP gave us visibility into the severity of the problem that we wouldn’t have had before.&lt;/p&gt;  &lt;p&gt;During this interim time, I also worked on a number of prototype projects and helped the SDL tools team work on the current version of the &lt;a href="http://msdn.microsoft.com/en-us/security/dd206731.aspx"&gt;threat modeling tool&lt;/a&gt;.&amp;#160; played around with some new (to me) development strategies – RAII and exception based programming and test driven development.&amp;#160; &lt;/p&gt;  &lt;p&gt;In June of 2007, we started working on actual feature planning – the planning team had come up with a set of tentative features for Win7 and we started the actual design for the features – figuring out the user experience for the features, the internal implementation details, etc.&amp;#160;&amp;#160; During the first milestone, I worked on the &lt;a href="http://blogs.msdn.com/larryosterman/archive/2009/08/04/a-few-of-my-favorite-win7-sound-features-capture-monitor-aka-listen-to.aspx"&gt;capture monitor&lt;/a&gt; feature – I ended up writing the feature from start to finish.&amp;#160; This was my first time writing features using RAII and using TDD.&amp;#160; I’ve got to say that I like it – as I remember, there were only 2 or 3 bugs found in the capture monitor that weren’t found by my unit tests and I’m not aware of any bugs that were found outside the team (which might just be an indication of how little the feature is used :)).&lt;/p&gt;  &lt;p&gt;After the capture monitor work, I spent the next milestone working on UI features – I was on a feature crew of 2 developers working on enhancing sndvol to make it work better with multiple devices and to fix a number of accessibility issues with the UI.&amp;#160; This was the first time in my almost 25 years at Microsoft where I had an opportunity to do “real” UI development.&amp;#160; I know that there’s a lot of controversy about the UI choices we made but I’m pretty happy with the UI changes.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;The third milestone for Win7 I worked on the “&lt;a href="http://blogs.msdn.com/larryosterman/archive/2008/11/25/the-ducking-whitepaper-is-now-online.aspx"&gt;Ducking&lt;/a&gt;” feature.&amp;#160; Of all the features I worked on for WIn7, the ducking feature is the closest to a “&lt;a href="http://en.wikipedia.org/wiki/DWIM"&gt;DWIM&lt;/a&gt;” feature in Windows – the system automatically decreases the volume for applications when you start a communicating with other people (this feature requires some application changes to work correctly though which is why you don’t see it in use right now (although it has shown up in &lt;a href="http://forums.steampowered.com/forums/showthread.php?t=784346"&gt;at least one application&lt;/a&gt; by accident)).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The remarkable thing about Win7 development was that it was almost friction free.&amp;#160; During the Vista development process (and in every other product I’ve worked on) development was marked by a constant stream of new issues which were a constant drain on time an energy.&amp;#160; It felt like we moved from one crisis to another crisis.&amp;#160; For Win7 it was different.&amp;#160; I think it was some time during the second milestone that I realized that Win7 was “special”.&amp;#160; The newer development process that was deployed for Win7 was clearly paying off and my life was far less stressed.&amp;#160; In fact I don’t think I worked late or came in on weekends once during the entire 3 years that Win7 was under development – this was a HUGE change.&amp;#160; Every other product I’ve ever worked on has required late nights and weekends (sometime it required all-nighters).&amp;#160; But for Win7 it just didn’t happen.&amp;#160; Instead we set a set of goals that were reasonable with achievable schedules and we executed on those goals and delivered the features we promised.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’m so happy that customers are now going to be able to play with the stuff we’ve all worked so hard to deliver to you.&amp;#160; Enjoy :).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;[1] I started writing this on the 22nd but didn’t finish it until today.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9912165" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Win7 Whoppers</title><link>http://blogs.msdn.com/larryosterman/archive/2009/10/21/win7-whoppers.aspx</link><pubDate>Thu, 22 Oct 2009 01:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9911051</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9911051.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9911051</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9911051</wfw:comment><description>&lt;P&gt;Wow, one of my co-workers just sent this image out.&amp;nbsp; It’s totally awesome (IMHO)…&lt;/P&gt;
&lt;P&gt;&lt;A title=http://twitpic.com/mehp6/full href="http://twitpic.com/mehp6/full" mce_href="http://twitpic.com/mehp6/full"&gt;http://twitpic.com/mehp6/full&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: The image tag didn't work for some reason so I removed it and just left the link...&lt;/P&gt;
&lt;P&gt;Bonus: The first Win7 ad: &lt;A href="http://video.nytimes.com/video/2009/10/21/multimedia/1247465293593/an-ad-for-windows-7-from-microsoft.html"&gt;http://video.nytimes.com/video/2009/10/21/multimedia/1247465293593/an-ad-for-windows-7-from-microsoft.html&lt;/A&gt;#&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9911051" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/It_2700_s+Funny+_3A002900_/default.aspx">It's Funny :)</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Building a flicker free volume control</title><link>http://blogs.msdn.com/larryosterman/archive/2009/09/16/building-a-flicker-free-volume-control.aspx</link><pubDate>Thu, 17 Sep 2009 00:50:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9896072</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>30</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9896072.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9896072</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9896072</wfw:comment><description>&lt;p&gt;When we shipped Windows Vista, one of the really annoying UI annoyances with the volume control was that whenever you resized it, it would flicker.&amp;#160; &lt;/p&gt;  &lt;p&gt;To be more specific, the right side of the control would flicker – the rest didn’t flicker (which was rather strange).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Between the Win7 PDC release (what we called M3 internally) and the Win7 Beta, I decided to bit the bullet and see if I could fix the flicker.&amp;#160; It seems like I tried everything to make the flickering go away but I wasn’t able to do it until I ran into the &lt;a href="http://blogs.msdn.com/larryosterman/archive/2008/08/27/larry-s-new-favorite-windows-message-wm-printclient.aspx"&gt;WM_PRINTCLIENT&lt;/a&gt; message which allowed me to direct all of the internal controls on the window to paint themselves.&lt;/p&gt;  &lt;p&gt;Basically on a paint call, I’d take the paint DC and send a WM_PRINTCLIENT message to each of the controls in sndvol asking them each to paint themselves to the new DC.&amp;#160; This worked almost perfectly – I was finally able to build a flicker free version of the UI.&amp;#160; The UI wasn’t perfect (for instance the animations that faded in the “flat buttons” didn’t fire) but the UI worked just fine and looked great so I was happy that' I’d finally nailed the problem.&amp;#160; That happiness lasted until I got a bug report in that I simply couldn’t figure out.&amp;#160; It seems that if you launched the volume mixer, set the focus to another application then selected the volume mixer’s title bar and moved the mixer, there were a ton of drawing artifacts left on the screen.&lt;/p&gt;  &lt;p&gt;I dug into it a bunch and was stumped.&amp;#160; It appeared that the clipping rectangle sent in the WM_PAINT message to the top level message didn’t include the entire window, thus portions of the window weren’t erased.&amp;#160; I worked on this for a couple of days trying to figure out what was going wrong and I finally asked for help on one of our internal mailing lists.&lt;/p&gt;  &lt;p&gt;The first response I got was that I shouldn’t use WM_PRINTCLIENT because it was going to cause me difficulty.&amp;#160; I’d already come to that conclusion – by trying to control every aspect of the drawing experience for my app, I was essentially working against the window manager – that’s why the repaint problem was happening.&amp;#160; By calling WM_PRINTCLIENT I was essentially putting a band-aid on the real problem but I hadn’t solved the &lt;em&gt;real &lt;/em&gt;problem, all I’d done is to hide it. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So I had to go back to the drawing board.&amp;#160; Eventually (with the help of one of the developers on the User team) I finally tracked down the original root cause of the problem and it turns out that the root cause was somewhere totally unexpected.&lt;/p&gt;  &lt;p&gt;Consider the volume UI:&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/Buildingaflickerfreevolumecontrol_D098/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/Buildingaflickerfreevolumecontrol_D098/image_thumb.png" width="493" height="353" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The UI is composed of two major areas: The “Devices” group and the “Applications” group.&amp;#160; There’s a group box control wrapped around the two areas.&lt;/p&gt;  &lt;p&gt;Now lets look at the group box control.&amp;#160; For reasons that are buried deep in the early history of Windows, a group box is actually a form of the “button” control.&amp;#160; If you look at the window styles for a button in SpyXX, you’ll see: &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/Buildingaflickerfreevolumecontrol_D098/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/Buildingaflickerfreevolumecontrol_D098/image_thumb_1.png" width="400" height="302" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Notice the CS_VREDRAW and CS_HREDRAW window class styles.&amp;#160; The &lt;a href="http://msdn.microsoft.com/en-us/library/ms633574(VS.85).aspx#class_styles"&gt;MSDN documentation for class styles&lt;/a&gt; says:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;CS_HREDRAW - Redraws the entire window if a movement or size adjustment changes the width of the client area.     &lt;br /&gt;CS_VREDRAW - Redraws the entire window if a movement or size adjustment changes the height of the client area.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In other words every window class with the CS_HREDRAW or CS_VREDRAW style will &lt;em&gt;always &lt;/em&gt;be fully repainted whenever the window is resized (including all the controls inside the window).&amp;#160; And ALL buttons have these styles.&amp;#160; That means that whenever you resize &lt;em&gt;any&lt;/em&gt; buttons, they’re going to flicker, and so will all of the content that lives below the button.&amp;#160; For most buttons this isn’t a big deal but for group boxes it can be a big issue because group boxes contain other controls.&lt;/p&gt;  &lt;p&gt;In the case of sndvol, when you resize the volume control, we resize the applications group box (because it’s visually pinned to the right side of the dialog).&amp;#160; Which causes the group box and all of its contained controls to repaint and thus flicker like crazy.&amp;#160; The only way to fix this is to remove the CS_HREDRAW and CS_VREDRAW buttons from the window style for the control.&lt;/p&gt;  &lt;p&gt;The good news is that once I’d identified the root cause, the solution to my problem was relatively simple.&amp;#160; I needed to build my own custom version of the group box which handled its own painting and didn’t have the CS_HREDRAW and CS_VREDRAW class.&amp;#160; Fortunately it’s really easy to draw a group box – if themes are enabled a group box can be drawn with &lt;a href="http://social.msdn.microsoft.com/Search/en-US?query=drawthemebackground&amp;amp;ac=3"&gt;DrawThemeBackground&lt;/a&gt; API with the &lt;a href="http://msdn.microsoft.com/en-us/library/bb773210(VS.85).aspx"&gt;BP_GROUPBOX&lt;/a&gt; part and if theming is disabled, you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/dd162477(VS.85).aspx"&gt;DrawEdge&lt;/a&gt; API to draw the group box.&amp;#160; Once I added the new control that and dealt with a number of other clean-up issues (making sure that the right portions of the window were invalidated when the window was resized for example), making sure that my top level control had the WS_CLIPCHILDREN style and that each of the sub windows had the WS_CLIPSIBLINGS style I had a version of sndvol that was flicker free AND which let the window manager handle all the drawing complexity.&amp;#160; There are still some minor visual gotchas in the UI (for example, if you resize the window using the left edge the right side of the group box “shudders” a bit – this is apparently an artifact that’s outside my control – other apps have similar issues when resized on the left edge) but they’re acceptable.&lt;/p&gt;  &lt;p&gt;As an added bonus, now that I was no longer painting everything manually, the fade-in animations on the flat buttons started working again!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;PS: While I was writing this post, I ran into this &lt;a href="http://www.catch22.net/tuts/flicker"&gt;tutorial on building flicker free applications&lt;/a&gt;, I wish I’d run into it while I was trying to deal with the flickering problem because it nicely lays out how to solve the problem.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9896072" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Nifty+Win32+tricks_2E00_/default.aspx">Nifty Win32 tricks.</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Elliot Omiya, Frank Yerrace and I make a video…</title><link>http://blogs.msdn.com/larryosterman/archive/2009/08/11/elliot-omiya-frank-yerrace-and-i-make-a-video.aspx</link><pubDate>Wed, 12 Aug 2009 00:39:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9865016</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9865016.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9865016</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9865016</wfw:comment><description>&lt;p&gt;Charles just let me know that he’s &lt;a href="http://channel9.msdn.com/shows/Going+Deep/Elliot-H-Omiya-Larry-Osterman-and-Frank-Yerrace-Inside-Windows-7-Audio-Stack/"&gt;posted a video&lt;/a&gt; that Elliot, Frank and I did talking about the audio features added to Win7 and some of the architectural decisions that went into it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9865016" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>A quick run through the new Windows 7 multimedia audio SDK samples</title><link>http://blogs.msdn.com/larryosterman/archive/2009/08/07/a-quick-run-through-the-new-windows-7-multimedia-audio-sdk-samples.aspx</link><pubDate>Fri, 07 Aug 2009 22:17:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9860547</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9860547.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9860547</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9860547</wfw:comment><description>&lt;p&gt;As I mentioned yesterday, the &lt;a href="http://blogs.msdn.com/larryosterman/archive/2009/08/06/the-windows-7-sdk-is-live.aspx"&gt;Windows SDK is now live&lt;/a&gt;.&amp;#160; For the Windows SDK, there are 9 new samples (and one changed samples).&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Two of the SDK samples demonstrate the WIndows 7 “Ducking” feature – they’re actually based on the code I wrote for my &lt;a href="http://channel9.msdn.com/pdc2008/PC13/"&gt;PDC talk last year&lt;/a&gt;, but tweaked to show some new scenarios and clean up the code (the original PDC code was &lt;em&gt;not&lt;/em&gt; ready for prime time, it was strictly demo-ware).&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The DuckingMediaPlayer application shows both a &lt;em&gt;really &lt;/em&gt;simple DirectShow based media player but also shows how to integrate the players volume control with the Windows per-application volume mixer.&amp;#160; So if you’re wondering how to integrate the volume control for your application with the built-in per-application volume controls, this sample will show you how to do it.&lt;/li&gt;    &lt;li&gt;The DuckingCaptureSample application is a trivial application that uses the wave APIs to capture audio data (and throw it away).&amp;#160; This shows how to trigger the “ducking”&amp;#160; feature in WIndows 7.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The other 7 samples reproduce functionality in the old WinAudio SDK sample – instead of providing a single monolithic audio sample, we crafted&amp;#160; different samples each of which shows one aspect of audio rendering.&amp;#160; All of these samples are simple console applications which read their parameters from the command line.&amp;#160; They’re intentionally extremely simple to reduce the potential for confusion in the samples.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The EndpointVolume sample shows how to use the IAudioEndpointVolume APIs.&amp;#160; It demonstrates using the VolumeStepUp, VolumeStepDown, SetMute and SetMasterVolumeLevelScalar APIs.&lt;/li&gt;    &lt;li&gt;The CaptureSharedEventDriven sample shows how to use WASAPI in “event driven” mode to capture data in shared mode from the microphone.&lt;/li&gt;    &lt;li&gt;The CaptureSharedTimerDriven sample shows how to use WASAPI in “timer driven” mode to capture data in shared mode from the microphone.&lt;/li&gt;    &lt;li&gt;The RenderSharedEventDriven sample shows how to use WASAPI in “event driven” mode to play a simple sine wave in shared mode from the speakers.&lt;/li&gt;    &lt;li&gt;The RenderSharedTimerDriven sample shows how to use WASAPI in “timer driven” mode to play a simple sine wave in shared mode from the speakers.&lt;/li&gt;    &lt;li&gt;The RenderExclusiveEventDriven sample shows how to use WASAPI in “event driven” mode to play a simple sine wave in exclusive mode from the speakers.&amp;#160; This also shows the “exclusive mode swizzle” that is required to align the buffer size with the hardware buffer size (which is required to work with many HDAudio solutions).&lt;/li&gt;    &lt;li&gt;The RenderExclusiveTimerDriven sample shows how to use WASAPI in “timer driven” mode to play a simple sine wave in exclusive mode from the speakers.&amp;#160; This also shows the “exclusive mode swizzle” that is required to align the buffer size with the hardware buffer size (which is required to work with many HDAudio solutions).&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The reason we don’t have capture exclusive samples is that we felt that users of the SDK could derive the exclusive capture samples from the render samples if it was important to them.&amp;#160; &lt;/p&gt;  &lt;p&gt;All the shared mode samples also show how to implement stream switching.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One of the things I’m quite proud about the samples is their structure.&amp;#160; Each sample has the following basic file layout:&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt; Directory of C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\audio\RenderExclusiveEventDriven

08/07/2009  10:08 AM    &amp;lt;DIR&amp;gt;          .
08/07/2009  10:08 AM    &amp;lt;DIR&amp;gt;          ..
07/14/2009  06:54 PM             7,079 CmdLine.cpp
07/14/2009  06:54 PM               760 CmdLine.h
07/14/2009  06:54 PM             2,084 ReadMe.txt
07/14/2009  06:54 PM               533 stdafx.cpp
07/14/2009  06:54 PM               935 stdafx.h
07/14/2009  06:54 PM             1,067 targetver.h
07/14/2009  06:54 PM             1,925 ToneGen.h
07/14/2009  06:54 PM            18,376 WASAPIRenderer.cpp
07/14/2009  06:54 PM             2,560 WASAPIRenderer.h
07/14/2009  06:54 PM            14,754 WASAPIRenderExclusiveEventDriven.cpp
07/14/2009  06:54 PM             1,283 WASAPIRenderExclusiveEventDriven.sln
07/14/2009  06:54 PM             8,403 WASAPIRenderExclusiveEventDriven.vcproj
              12 File(s)         59,759 bytes
               2 Dir(s)  62,822,105,088 bytes free&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Each sample has the same set of common files:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;CmdLine.cpp/CmdLine.h: A very simple command line parsing function&lt;/li&gt;

  &lt;li&gt;stdafx.cpp/stdafx.h: Common header definitions&lt;/li&gt;

  &lt;li&gt;targetver.h: Defines the target platform for these samples (Windows Vista in this case).&lt;/li&gt;

  &lt;li&gt;ToneGen.h: A very simple sine wave generating function (not present for the capture samples).&lt;/li&gt;

  &lt;li&gt;WASAPIRenderer.cpp/WASAPIRenderer.h (WASAPICapture for capture samples): The code which does all the WASAPI rendering and/or capturing&lt;/li&gt;

  &lt;li&gt;&amp;lt;SampleName&amp;gt;: Scaffolding for the sample – this defines the command line parameters and instantiates the actual render/capture object and asks it to do the rendering/capturing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these samples is essentially identical, in fact they’re sufficiently similar that you can use your favorite file comparison tool to see what code has to change to go from one mode to another.&amp;#160; So to see what changes are required to go from exclusive timer driven to exclusive event driven, you can windiff the RenderExclusiveEventDriven\WASAPIRenderer.cpp and RenderExclusiveTimerDriven\WASAPIRenderer.cpp files and see what changes are required to implement the different model.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9860547" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>The Windows 7 SDK is live!</title><link>http://blogs.msdn.com/larryosterman/archive/2009/08/06/the-windows-7-sdk-is-live.aspx</link><pubDate>Fri, 07 Aug 2009 02:56:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9859706</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9859706.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9859706</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9859706</wfw:comment><description>&lt;p&gt;I just received email that the new Windows 7 SDK is now &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=71deb800-c591-4f97-a900-bea146e4fae1&amp;amp;displaylang=en"&gt;live&lt;/a&gt;!&amp;#160; Apparently it’s not on the &lt;a href="http://msdn.microsoft.com/en-us/windows/bb980924.aspx"&gt;Windows SDK download site&lt;/a&gt; yet, but if you click on the first link, you can download an ISO which contains the SDK.&amp;#160; &lt;/p&gt;  &lt;p&gt;For the Win7 SDK, I wrote about 8 new samples in the Multimedia\Audio category, they’re described &lt;a href="http://blogs.msdn.com/windowssdk/archive/2009/07/02/new-win32-samples-in-windows-sdk-for-windows-7-multimedia.aspx"&gt;here&lt;/a&gt; (check the Multimedia\Audio samples.&amp;#160; These samples replace the old WinAudio SDK sample – basically I took the old WinAudio sample and blew it up into 8 different samples which demonstrate different aspects of rendering audio using WASAPI.&lt;/p&gt;  &lt;p&gt;I’ll write some more about the samples tomorrow – there are some cool things in the way the samples are structured that I hope will help developers who want to understand the difference between the various WASAPI render and capture modes.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9859706" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>A few of my favorite Win7 Sound features – Stream Switching</title><link>http://blogs.msdn.com/larryosterman/archive/2009/08/05/a-few-of-my-favorite-win7-sound-features-stream-switching.aspx</link><pubDate>Thu, 06 Aug 2009 00:45:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9858436</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>29</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9858436.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9858436</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9858436</wfw:comment><description>&lt;p&gt;Way back when I was in college, I learned Lisp using a derivative of Lisp called &lt;a href="http://en.wikipedia.org/wiki/Maclisp"&gt;MACLISP&lt;/a&gt; (named for MIT’s project MAC, not for anything that came from a fruity company in Cupertino).&amp;#160; One of the coolest features that MACLISP offered was the (DWIM) command – basically if you had a typo when entering an s-list into MACLISP, you could type (&lt;a href="http://www.catb.org/~esr/jargon/html/D/DWIM.html"&gt;DWIM&lt;/a&gt;) and the MACLISP interpreter would fix your code for you (and yeah, it usually got it somewhat wrong :)).&lt;/p&gt;  &lt;p&gt;Stream Switching is a DWIM feature in the audio stack.&amp;#160; If an application is rendering to a default audio device and the device is removed, the audio stream will automatically switch to the new device.&amp;#160; The same happens if the default device changes for other reasons (if the user changes the default device for example) or if the sample rate on the device changes (this can happen with certain types of audio hardware allow external controls to change the sample rate for the device).&lt;/p&gt;  &lt;p&gt;We were able to figure out how to implement the stream switching logic in a fashion that causes it to work without requiring changes from 3rd party applications, which is really cool because it allows us to enable new scenarios without breaking appcompat – as long as the application is rendering to a default endpoint, we’ll stream switch the application without the app being notified.&lt;/p&gt;  &lt;p&gt;If an application is rendering to a specific endpoint, we’re not going to stream switch when the endpoint is removed – we don’t know the reasons for the application choosing that particular endpoint so we don’t attempt to second guess the applications intent (maybe the user has asked that their music player only play through the headphones and not through the speakers because playing through the speakers would disturb the baby).&lt;/p&gt;  &lt;p&gt;We also don’t support stream switching if the application is using WASAPI (the low level audio rendering APIs) to render audio.&amp;#160; That’s for a number of reasons, but mostly it’s because the presumption is that any application that is using WASAPI is using a low level rendering API and thus doesn’t want this kind of behavior.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The stream switching logic is really cool in action, especially if you’ve got a machine which supports dynamic jack detection – when you’re watching a DVD in windows media player and you plug in a pair of headphones, poof – the audio gets redirected to the headphones just like you’d expect it to.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9858436" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>A few of my favorite Win7 Sound features – Capture Monitor (aka Listen to…)</title><link>http://blogs.msdn.com/larryosterman/archive/2009/08/04/a-few-of-my-favorite-win7-sound-features-capture-monitor-aka-listen-to.aspx</link><pubDate>Tue, 04 Aug 2009 20:30:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9857282</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9857282.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9857282</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9857282</wfw:comment><description>&lt;p&gt;The capture monitor is a feature that allows you to listen to a portable media player (or any other microphone input) through your PC speakers.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First a bit of history.&amp;#160; Way back in the dark ages (Windows XP timeframe), audio solution manufacturers used to include an analog circuitry that connected the line in to the speaker jack on the PC.&amp;#160; They routed this through an analog volume control and exposed this through the audio device topology.&amp;#160; People used this functionality to connect their portable media players to their PCs.&amp;#160; While this feature was popular with customers, the cost of providing the circuitry was too much for some IHVs and they started removing this functionality from their products starting some time before Vista shipped.&lt;/p&gt;  &lt;p&gt;Not surprisingly, customers complained about this and we decided to implement equivalent functionality in the audio subsystem in Windows.&amp;#160; Because we’re doing this in the audio subsystem instead of in hardware, it allows you to configure the capture to run between any two devices.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To configure the capture monitor, you go to the properties page for the input device and select the “Listen” tab:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesCapture_93BA/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="Listen to... control panel page" border="0" alt="Listen to... control panel page" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesCapture_93BA/image_thumb.png" width="414" height="461" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Once you select the “Listen to this device” checkbox (and hit apply), the system will start capturing data from the input and rendering it to the output device.&amp;#160; I’ve been using it to listen to my media player for months :).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’ve been really gratified to see that both &lt;a href="http://blogs.zdnet.com/Bott/?p=1195&amp;amp;page=2"&gt;Ed Bott&lt;/a&gt; and &lt;a href="http://lifehacker.com/5326409/play-your-ipod-through-your-windows-7-pcs-speakers"&gt;Lifehacker&lt;/a&gt; (who picked this up from Ed) have noticed this feature, it was a huge amount of fun to write.&amp;#160; It was also my first experience using TDD (or rather a variant of TDD – instead of writing the test first then the code, I wrote the code and the test for the code at the exact same time) - based on my experiences, I’m totally sold on it as a development paradigm.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9857282" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>A few of my favorite Win7 Sound features – UI refinements</title><link>http://blogs.msdn.com/larryosterman/archive/2009/08/03/a-few-of-my-favorite-win7-sound-features-ui-refinements.aspx</link><pubDate>Tue, 04 Aug 2009 02:08:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9856614</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>64</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9856614.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9856614</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9856614</wfw:comment><description>&lt;p&gt;Well, we shipped Windows 7, and now I’d like to talk about a few of my favorite features that were added by the Sound team.&amp;#160; Most of them fit in the “make it just work the way it’s supposed to”, but a few are just cool.&lt;/p&gt;  &lt;p&gt;I also want to call out some stuff that people probably are going to miss in the various Windows 7 reviews.&lt;/p&gt;  &lt;p&gt;One of the areas I want to call out is the volume UI.&amp;#160; There’s actually been a ton of work done on the volume UI in Windows 7, although most of it exists under the covers.&amp;#160; For instance, the simple volume control (the one you get to with a single click from the volume notification area) uses what we call “flat buttons”.&lt;/p&gt;  &lt;p align="center"&gt;   &lt;table border="1" cellspacing="0" cellpadding="2" width="441"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="218"&gt;           &lt;p align="center"&gt;Windows 7 Simple Volume UI:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;         &lt;/td&gt;          &lt;td valign="top" width="221"&gt;           &lt;p align="center"&gt;Windows Vista Simple Volume UI:&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="218"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Win7 Simple Volume" border="0" alt="Win7 Simple Volume" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_thumb.png" width="84" height="305" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td valign="top" width="221"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/sndvolvista_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Vista Simple Volume " border="0" alt="Vista Simple Volume " src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/sndvolvista_thumb.jpg" width="88" height="269" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Both the mute control and the device button are “flat buttons” – when you mouse over the buttons, the button surfaces:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="simple volume with &amp;quot;flat button&amp;quot; enabled" border="0" alt="simple volume with &amp;quot;flat button&amp;quot; enabled" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_thumb_3.png" width="84" height="305" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;By using the “flat buttons”, the UI continues to have the old functionality, but it visually appears cleaner.&amp;#160; There have been a number of other changes to the simple volume UI.&amp;#160; First off, we will now show more than one slider if you have more than one audio solution on your machine and you’re using both of them at the same time.&amp;#160; This behavior is controlled by the new volume control options dialog:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_thumb_2.png" width="415" height="415" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;As I mentioned above, the device icon is also a “flat button” – this enables one click access to the hardware properties for you audio solution.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The volume mixer has also changed slightly.&amp;#160; You’ll notice the flat buttons for the device and mute immediately.&amp;#160; We also added a flat button for the System Sounds which launches the system sounds applet.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_thumb_1.png" width="489" height="349" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Another subtle change to the volume mixer is that there are now meters for individual applications as well as for the master volume:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/AfewofmyfavoriteWin7SoundfeaturesUIrefin_E2E9/image_thumb_4.png" width="489" height="349" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;And finally, the volume mixer no longer flickers when resizing (yay!).&amp;#160; Fixing the flicker was a problem that took a ton of effort (and I needed to ask the User team for help figuring out the problem) – the solution turned out to be simple but it took some serious digging to figure it out.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9856614" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>6.1.7600.16385</title><link>http://blogs.msdn.com/larryosterman/archive/2009/07/22/6-1-7600-16385.aspx</link><pubDate>Thu, 23 Jul 2009 00:10:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9845283</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>18</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9845283.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9845283</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9845283</wfw:comment><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;‘nuf said.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9845283" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Thinking about Windows Build numbers</title><link>http://blogs.msdn.com/larryosterman/archive/2009/07/08/thinking-about-windows-build-numbers.aspx</link><pubDate>Thu, 09 Jul 2009 01:30:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9824996</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>31</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9824996.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9824996</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9824996</wfw:comment><description>&lt;p&gt;There’s been an ongoing thread internally speculating about the windows build number that will be chosen for Windows 7 when it finally ships.&amp;#160; What’s interesting is that we’re even having speculation about the builds being chosen.&amp;#160; &lt;/p&gt;  &lt;p&gt;The Windows version is actually composed of a bunch of different fields, all packed into an &lt;a href="http://msdn.microsoft.com/en-us/library/ms724834(VS.85).aspx"&gt;OSVERSIONINFO&lt;/a&gt; structure.&amp;#160; The relevant parts of the OSVERSIONINFO are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Major Version (dwMajorVersion)&lt;/li&gt;    &lt;li&gt;Minor Version (dwMinorVersion)&lt;/li&gt;    &lt;li&gt;Build # (dwBuildNumber)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The major and minor version numbers are primarily marketing numbers – they’re broad brush fields that the marketing department decides are appropriate for the OS.&amp;#160; For Windows 7, the major and minor versions have been fixed at 6.1 for many months now, but the build numbers change more-or-less daily. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Back to my story… Back in the dark ages when Windows NT was first developed, the rules for build numbers were relatively simple.&amp;#160; Today's build is yesterdays build number + 1.&amp;#160; That’s why Windows NT 3.1 was build number 511, NT3.5 was build 807, NT 3.51 was build 1057, NT 4.0 was build 1381.&lt;/p&gt;  &lt;p&gt;But after NT 4.0, things changed.&lt;/p&gt;  &lt;p&gt;When Brian Valentine moved from the Exchange team to the Windows team, he brought with him a tradition that the Exchange team used – The Exchange build numbers were rounded up to round numbers for major milestones in the product.&amp;#160; So Exchange 4.0’s RTM version was 4.0.837 but Exchange 5.0 started at build 1000 (maybe it was 900, I honestly don’t remember).&amp;#160; For NT, Brian and his team adopted this scheme but used it to ensure that the OS build number was a round number – so WIndows 2000 (the first version of Windows that was shipped with Brian as the lead) it had a (relatively) round version number of 5.0.2195.&lt;/p&gt;  &lt;p&gt;That tradition was continued with Windows XP (5.1.2600) and Vista (6.0.6000).&amp;#160; In the Vista case, it appears that there was some massaging of the numbers to make the build number work out so evenly – &lt;a href="http://www.aeroxp.org/board/index.php?showtopic=4167"&gt;this&lt;/a&gt; list of build numbers shows that the build numbers jumped from 5825 to 5840 to 5920 to 6000 during the final push – the last few build numbers were incremented by 80 each build with sub-build numbers (&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.updateservices.clientservicing.clientinfo.clientversionqfenumber(VS.85).aspx"&gt;QFE number&lt;/a&gt;) incrementing by 1 between the builds.&lt;/p&gt;  &lt;p&gt;For Windows 7, we’ve also seen a number of jumps in build numbers.&amp;#160; The PDC build was build 6801, the Beta build was 7000 and the RC build was 7100.&amp;#160; It’ll be interesting to see what the final build number will be (whenever that happens).&amp;#160; I honestly have no idea what the number’s going to be.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9824996" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Microsoft+History/default.aspx">Microsoft History</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>When you do UX work, sometimes you have to worry about the strangest things…</title><link>http://blogs.msdn.com/larryosterman/archive/2009/01/13/when-you-do-ux-work-sometimes-you-have-to-worry-about-the-strangest-things.aspx</link><pubDate>Tue, 13 Jan 2009 20:13:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9316088</guid><dc:creator>LarryOsterman</dc:creator><slash:comments>31</slash:comments><comments>http://blogs.msdn.com/larryosterman/comments/9316088.aspx</comments><wfw:commentRss>http://blogs.msdn.com/larryosterman/commentrss.aspx?PostID=9316088</wfw:commentRss><wfw:comment>http://blogs.msdn.com/larryosterman/rsscomments.aspx?PostID=9316088</wfw:comment><description>&lt;p&gt;I recently got a bug reported to me about the visuals in the sound control panel applet not being aligned properly (this is from the UI for a new Windows 7 feature):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/WhenyoudoUXworksometimesyouhavetoworryab_816E/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/WhenyoudoUXworksometimesyouhavetoworryab_816E/image_thumb.png" width="415" height="237" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The problem as reported was that the microphone was aligned incorrectly w.r.t. the down arrow. – the microphone was too far to the right.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But if you look carefully, you’ll see that that isn’t the case – drawing a box around the controls makes it clearer:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/WhenyoudoUXworksometimesyouhavetoworryab_816E/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/WhenyoudoUXworksometimesyouhavetoworryab_816E/image_thumb_1.png" width="416" height="238" /&gt;&lt;/a&gt;Nitpickers Corner: For those of you that love to count pixels, it’s entirely possible that the arrow might be off by a couple of pixels but fixing it wouldn’t fix the problem, because then the arrow would be off-center with respect to the speakers.&amp;#160; The real problem is that the microphone icon is visually weighted to the right – the actual icon resource was lined up with the arrow, but because the visual weight was to the right, it displayed poorly.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;It turns out that there’s really no good way of fixing this – if we were to adjust the location of the icons, it wouldn’t help, because a different device would have a different visual center (as the speaker icon does)…&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Instead, we looked at the visuals and realized that there was an alternative solution: Adjust the layout for the dialog and the problem more-or-less goes away:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/WhenyoudoUXworksometimesyouhavetoworryab_816E/newmonitor.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="newmonitor" border="0" alt="newmonitor" src="http://blogs.msdn.com/blogfiles/larryosterman/WindowsLiveWriter/WhenyoudoUXworksometimesyouhavetoworryab_816E/newmonitor_thumb.png" width="416" height="215" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The problem still exists at some level because the arrow is centered with the icons but some icons (like the stalk microphone above) are bottom heavy.&amp;#160; But for whatever reason, the visuals aren’t as disconcerting when laid out horizontally.&lt;/p&gt;  &lt;p&gt;As I said in the title – sometimes you need to worry about the strangest things.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9316088" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Fascinating+geek+stuff/default.aspx">Fascinating geek stuff</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/larryosterman/archive/tags/Windows+7/default.aspx">Windows 7</category></item></channel></rss>