Showing results for July 2005 - Page 3 of 4 - The Old New Thing

Jul 11, 2005
0
0

Converting from traditional to simplified Chinese, part 1: Loading the dictionary

Raymond Chen
Raymond Chen

One step we had glossed over in our haste to get something interesting on the screen in our Chinese/English dictionary program was the conversion from traditional to simplified Chinese characters. The format of the hcutf8.txt file is a series of lines, each of which is a UTF-8 encoded string consisting of a simplified Chinese character followed ...

Code
Jul 8, 2005
0
0

The best book on ActiveX programming ever written

Raymond Chen
Raymond Chen

I was introduced to the glory that is the world of Mr. Bunny many years ago. Mr. Bunny's Guide to ActiveX is probably the best book on ActiveX programming ever written. If you haven't figured it out by now, it's a humor book, but it's the sort of madcap insane geek humor that has enough truth in it to make you laugh more. My favorite is the ...

Other
Jul 8, 2005
0
0

How can I recover the dialog resource ID from a dialog window handle?

Raymond Chen
Raymond Chen

Occasionally, I see someone ask a question like the following. I have the handle to a dialog window. How can I get the original dialog resource ID that the dialog was created from? As we saw in our in-depth discussion of how dialogs are created from dialog templates, the dialog template itself is not saved anywhere. The purpose of a template ...

Other
Jul 7, 2005
0
0

What struck me about life in the Republic

Raymond Chen
Raymond Chen

When people asked me for my reaction to the most recent Star Wars movie, I replied that what struck me most was that the Republic doesn't appear to have any building codes. There are these platforms several hundred meters above the ground with no railings. For example, Padmé Amidala's fancy apartment has a front porch far above the ground. ...

Non-Computer
Jul 7, 2005
0
0

What are SYSTEM_FONT and DEFAULT_GUI_FONT?

Raymond Chen
Raymond Chen

Among the things you can get with the function are two fonts called and . What are they? They are fonts nobody uses any more. Back in the old days of Windows 2.0, the font used for dialog boxes was a bitmap font called System. This is the font that retrieves, and it is still the default dialog box font for compatibility reasons. Of ...

History
Jul 6, 2005
0
0

What’s the point of DeferWindowPos?

Raymond Chen
Raymond Chen

The purpose of the DeferWindowPos function is to move multiple child windows at one go. This reduces somewhat the amount of repainting that goes on when windows move around. Take that DC brush sample from a few months ago and make the following changes: HWND g_hwndChildren[2]; BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpcs) { const static ...

Code
Jul 5, 2005
0
0

Answers to yesterday’s holiday fun puzzles

Raymond Chen
Raymond Chen

Puzzle 1: This was a word search consisting of the names of the twelve streets of central downtown Seattle. The unused letters spell out the message "Issaquah year's supply hair conditioner", which takes you to the Issaquah Costco. (In the real puzzle, the secret message was much odder but relied on an inside joke.) Puzzle 2: The cryptogram ...

Non-Computer
Jul 5, 2005
0
0

Using script to query information from Internet Explorer windows

Raymond Chen
Raymond Chen

Some time ago, we used C++ to query information from the ShellWindows object and found it straightforward but cumbersome. This is rather clumsy from C++ because the ShellWindows object was designed for use by a scripting language like JScript or Visual Basic. Let's use one of the languages the ShellWindows object was designed for to ...

Code
Jul 4, 2005
0
0

Some holiday fun: Puzzle supplementary material

Raymond Chen
Raymond Chen

(Note: This makes sense only after you've gone through the other puzzles.) In case my friend got stuck, she could call me and ask for a hint. The original plan was that I would charge her a dare in order to get a hint, but it turns out I was too nice a guy to make her do any of the following things, but here's the list anyway...

Non-Computer
Jul 4, 2005
0
0

Some holiday fun: Puzzle #6

Raymond Chen
Raymond Chen

(Note: Read the puzzles in order from 1 to 6 for them to make sense.) To see the final puzzle you need an SVG- or VML-enabled browser. S H O R T S T O P P H T T R...

Non-Computer