Other uses for bitmap brushes

Bitmap brushes used to be these little 8×8 monochrome patterns that you could use for hatching and maybe little houndstooth patterns if you were really crazy. But you can do better. CreatePatternBrush lets you pass in any old bitmap – even a huge one, and it will create a brush from it. The bitmap will…

13

Why is address space allocation granularity 64K?

You may have wondered why VirtualAlloc allocates memory at 64K boundaries even though page granularity is 4K. You have the Alpha AXP processor to thank for that. On the Alpha AXP, there is no “load 32-bit integer” instruction. To load a 32-bit integer, you actually load two 16-bit integers and combine them. So if allocation…

8

In Explorer, you can right-click the icon in the caption

In Explorer, you can right-click the icon in the caption to get the context menu for the folder you are viewing. (Very handy for “Search” or “Command Prompt Here”.) Apparently not enough people realize this. In Windows 95, we tried to make it so most icons on the screen did something interesting when you right-clicked…

15

I’m doing this instead of writing a book

Some commenters mentioned that I should write a book. It turns out that writing a book is hard. A few years ago, MS Press actually approached me about writing a book for them. But I declined because the fashion for technical books is to take maybe fifty pages of information and pad it to a…

24

Low-tech usability testing

My pal Jason Moore discusses using paper prototypes as a fast way to get usability feedback. I found it interesting that by going low-tech, you actually get better feedback, because people are more willing to criticize a paper model than running code. (And another advantage of the paper model is that you can make changes…

1

Stupid memory-mapping tricks

Shared memory is not just for sharing memory with other processes. It also lets you share memory with yourself in sneaky ways. For example, this sample program (all error checking and cleanup deleted for expository purposes) shows how you can map the same shared memory into two locations simultaneously. Since they are the same memory,…

9

Researchers discover link between music and drinking

A British scientific study shows that a bit of classical music can persuade diners to buy more fancy coffees, pricey wines and luxurious desserts. “North has shown that playing German or French music can persuade diners to buy wine from those countries.” I found this to be true in my experience. If you get two…

1

Why does the System Properties page round the memory size?

During Windows 95 beta testing, people ran the System Properties page and complained about “missing memory”. The Windows 95 System Properties page reports the amount of memory available to Windows as system memory, which is not necessarily the same as the amount of memory installed in your computer. For example, you may have an old…

3

Why can’t I use &-accelerators on the Start menu?

The first letter of the program is the accelerator and there’s nothing you can do about it. So if you have ten programs by Microsoft, they all use the accelerator “M”. (Yes I hate this too. The first thing I do after installing a Microsoft program is go into the Start menu and delete the…

19

What do the text label colors mean for files?

Blue means compressed; green means encrypted. This is an example of one of those “come on, it’s a tiny, simple feature” requests. Yes, the code to do this isn’t particularly complicated, but it adds another element of “Ha ha, I’m going to do something in a way that you will never be able to figure…

23