Showing results for January 2004 - Page 2 of 5 - The Old New Thing

Jan 26, 2004
0
0

The hollow brush

Raymond Chen
Raymond Chen

What is the hollow brush for? The hollow brush is a brush that doesn't do anything. You can use it when you're forced to use a brush but you don't want to. As one example, you can use it as your class brush. Then when your program stops responding and Windows decide to do the "white flash" (see yesterday's entry), it grabs the hollow brush and en...

Code
Jan 26, 2004
0
0

David Hasselhoff's daughters normal in every way

Raymond Chen
Raymond Chen

(Forwarded to me my a friend who is apparently fascinated with David Hasselhoff.) David Hasselhoff says his daughters hate his music and change the channel whenever Knight Rider comes on the TV. Okay, I defended the Germans last week, but this one baffles even me. Do the Germans not realize that David Hasselhoff is a joke? Er war ein unbeudentend...

Non-Computer
Jan 25, 2004
0
0

German as RPN

Raymond Chen
Raymond Chen

It should be noted that "Reverse Polish Notation" is named in honor of the Polish logician Jan Lukasiewicz, who developed prefix notation, wherein the operator comes before the operands. Postfix notation proved more useful for stack-based arithmetic computations, and so the opposite of prefix notation came to be known as "Reverse Polish Notation"....

Non-Computer
Jan 23, 2004
0
0

The white flash

Raymond Chen
Raymond Chen

If you had a program that didn't process messages for a while, but it needed to be painted for whatever reason (say, somebody uncovered it), Windows would eventually lose patience with you and paint your window white. Or at least, that's what people would claim. Actually, Windows is painting your window with your class background brush. Since most...

History
Jan 23, 2004
0
0

German, the language of love?

Raymond Chen
Raymond Chen

Love lures French kids to German: Come and learn German - a language of love! Hundreds of advertisements in France this week will promote the unusual message to try to woo teenagers to a language they often consider difficult and ugly. "Language is the key to understand a partner, his culture, working manners and lifestyle," [Frenc...

Non-Computer
Jan 21, 2004
0
0

What tools should I assume everybody has?

Raymond Chen
Raymond Chen

My code samples assume you are using the latest header files from the Platform SDK (free download), the one that includes support for Win64. If you have an older SDK then you won't have various new data types like UINT_PTR and INT_PTR and should just use UINT and INT. I write code that is Win64-compliant as a matter of course since all code in Wi...

Other
Jan 21, 2004
0
0

Fixing security holes in other programs

Raymond Chen
Raymond Chen

Any crash report that involves a buffer overrun quickly escalates in priority. The last few that came my way were actually bugs in other programs that were detected by Windows. For example, there were a few programs that responded to the LVN_GETDISPINFO notification by overflowing the LVITEM.pszText buffer, writing more than LVITEM.cchTextMax char...

Other