Showing results for July 2003 - The Old New Thing

Jul 31, 2003
0
0

Scrollbars, part 4: Adding a proportional scrollbar

Raymond Chen
Raymond Chen

To obtain a proportional scrollbar, you need to tell Windows the minimum and maximum values covered by the scrollbar, the current scrollbar position, and the size of the scrollbar thumb (called the "page size"). One annoyance of the way scrollbars are set up is that the maximum value is attainable. This differs...

Code
Jul 30, 2003
0
0

Answer to yesterday's exercise

Raymond Chen
Raymond Chen

iMin is the lowest-index element which intersects the paint rectangle, so a simple truncating division produces the desired index. The formula for iMax can be interpreted two ways. One is that it is the roundup of the first invisible line. Recall the rectangles are exclusive of the endpoint, ...

Code
Jul 30, 2003
0
0

Why doesn't the new Start menu use Intellimenus in the All Programs list?

Raymond Chen
Raymond Chen

Common request: I want to be able to turn on personalized menus (Intellimenus) when in XP Start Menu mode. Imagine if Intellimenus were enabled with the XP Start Menu. You use 5 apps; the rest are not used much. (Studies show that 5 is the typical number of unique applications ...

History
Jul 29, 2003
0
0

Scrollbars, part 3: Optimizing the paint cycle

Raymond Chen
Raymond Chen

Observe that we paint all 100 lines in our paint handler, even though most of them aren't visible. This is a problem if there are a large number of items, or if painting an item is time-consuming. So instead, we optimize our paint cycle so as to paint only the elements which intersect the ...

Code
Jul 28, 2003
0
0

Why doesn't Windows have an "expert mode"?

Raymond Chen
Raymond Chen

We often get requests like this: There should be a slider bar somewhere, say on the Performance Tab, that ranges from Novice to Advanced. At the highest level, all the geek settings are turned on. At the Novice level, all the settings for beginners are turned on. In between, we can gradually enable stuff...

History
Jul 25, 2003
0
0

Scrollbars, part 2

Raymond Chen
Raymond Chen

Managing scrollbars is not hard in principle. The basic idea is not that difficult, but there are a lot of small details that need to be ironed out. If you don't get the details just right, your program will feel odd in a strange way that you often can't pinpoint, much like a subtle background hum that makes ...

Code
Jul 24, 2003
0
0

More terse Q&A on Tweak UI 2.10

Raymond Chen
Raymond Chen

I'm going to try to alternate between programming entries (where I actually try to teach something) and random entries (where I get to spout off or go into storytelling mode). So here's another random entry. Why does Tweak UI put up a totally incomprehensible error message ("Cannot locate...

Other
Jul 23, 2003
0
2

The scratch program

Raymond Chen
Raymond Chen

Occasionally, there is need to illustrate a point with a full program. To avoid reproducing the boring parts of the program, let's agree on using the following template for our sample programs. For expository purposes, I won't use a C++ class. I'll just keep all my variables global. In a real program, of course, instance data would be attached to ...

Code
Jul 22, 2003
0
4

Why do you have to click the Start button to shut down?

Raymond Chen
Raymond Chen

Short answer: The same reason you turn the ignition key to shut off your car. Long answer: Back in the early days, the taskbar didn't have a Start button. (In a future history column, you'll learn that back in the early days, the taskbar wasn't called the taskbar.) Instead of the ...

History
Jul 21, 2003
0
2

Tweak UI 2.10

Raymond Chen
Raymond Chen

What are you talking about? Tweak UI is part of the Windows XP PowerToys. It was recently updated to version 2.10. What OS is required? Windows XP Service Pack 1 (or higher) or Windows Server 2003 (all versions). Not supported: Windows XP RTM, Windows 2000...

Other