Posts by this author

Aug 18, 2003
Post comments count0
Post likes count3

Why does Windows 95 have functions called BEAR, BUNNY and PIGLET?

If you dig back into your Windows 95 files, you'll find that some internal system functions are given names like , and . Surely there is a story behind these silly names, isn't there? Of course there is. "Bear" is the name of the Windows 3.1 mascot, a stuffed teddy bear seemingly-obsessively ...

History
Aug 16, 2003
Post comments count0
Post likes count0

A day in the trenches

I got up at 5 this morning to spend the day at Product Support Services answering phones: today was the day the Blaster worm launched its second wave. And by a startling coincidence, the person at the station next to me was Michael Howard our Senior Security Program Manager and author of Writing ...

Other
Aug 15, 2003
Post comments count0
Post likes count0

Answer to exercise

The WM_SIZING handler intercepts only interactive resizing. If the user right-clicks the taskbar and selects "Cascade Windows", this resizes the window directly without going through the interactive WM_SIZING step

Code
Aug 13, 2003
Post comments count0
Post likes count0

Scrollbars part 8 – Integral interactive resizing

Enforcing integrality solves the fractional-line problem, but notice that when you grab the top or bottom edge and resize the window, the resize feedback doesn't match the actual window you get back if you drag the window to a non-integral size. (You may need to turn off full window drag to see this effect more...

Code
Aug 12, 2003
Post comments count0
Post likes count1

Why can't I remove "for test/evaluation purposes only"?

"Why can't I remove 'for test/evaluation purposes only'? I know I'm running an evaluation edition, I don't need it rubbed in my face." This prevents unscrupulous OEMs from selling machines with the evaluation edition of the product instead of the retail version. (Yes, this has happened before. Many ...

History
Aug 11, 2003
Post comments count0
Post likes count0

Scrollbars part 7 – Integrality

If you play around with resizing the window, you can get a fractional line to appear at the bottom of the screen. This is not normally a problem until you scroll to the very end of the list, say, by pressing the key, at which point an ugly blank space appears at the bottom. This ugly blank space is particularl...

Code
Aug 11, 2003
Post comments count0
Post likes count0

Answers to exercises

What is the significance of the cast in the computation of ? It isn't. I got the question wrong. The real question should have been "What is the significance of the cast in the computation of ?" The answer is to ensure that the computation is performed with signed integers throughout. ...

Code
Aug 8, 2003
Post comments count0
Post likes count4

Why is a registry file called a "hive"?

Useless trivia day. Why is a registry file called a "hive"? Because one of the original developers of Windows NT hated bees.  So the developer who was responsible for the registry snuck in as many bee references as he could.  A registry file is called a "hive", and registry...

History
Aug 7, 2003
Post comments count0
Post likes count0

A subtlety in the keyboard code

I neglected to call it out explicitly in the text for Part 5:  Notice that I use cRepeat to determine how many lines/pages to scroll.  This allows us to scroll the correct amount even if we are falling behind on input processing and are missing some autorepeats.

Code