Showing results for October 2013 - Page 2 of 3 - The Old New Thing

Oct 21, 2013
0
0

Using a toy cash register as a keyboard doesn't add up

Raymond Chen
Raymond Chen

I dreamed that I was composing a blog entry about one of my dreams, but I had to do it on a toy cash register which had been paired to my computer. It turns out that this is difficult for a number of reasons. For one thing, the cash register has only ten letters of the alphabet on it. You have to switch to the alternate keyboard for the rest. Als...

Non-ComputerDream
Oct 21, 2013
0
0

Opening and manipulating Internet Explorer windows programmatically

Raymond Chen
Raymond Chen

Today's Little Program takes the JavaScript application from a few years ago and converts it to C#. This was inspired by a customer who started with the question, "How can I close all Internet Explorer windows programmatically?" This was a strange request. After all, the user may be rather upset that their Amazon shopping spree was suddenly ter...

Code
Oct 18, 2013
0
0

The case of the redirected standard handles that won't close even though the child process has exited (and a smidge of Microspeak: reduction)

Raymond Chen
Raymond Chen

A customer had a supervisor process whose job is to launch two threads. Each thread in turn launches a child process, let's call them A and B, each with redirected standard handles. They spins up separate threads to read from the child processes' stdout in order to avoid deadlocks. What they've found is that even though child process&nbs...

CodeMicrospeak
Oct 17, 2013
0
0

What is the inverse of AdjustWindowRect and AdjustWindowRectEx?

Raymond Chen
Raymond Chen

We saw over a decade ago (my goodness I've been doing this way too long) that the and functions do not take menu wrapping into account because they don't take a window handle parameter, so they don't know what menu to test for wrapping. Still, they are useful functions if you aren't worried about menu wrapping because they let you do window siz...

Code
Oct 16, 2013
0
0

Why does my window get a WM_ACTIVATE message when it isn't active?

Raymond Chen
Raymond Chen

Say you launch a program, and for whatever reason the program takes a long time to start up, so you start doing something else, say launching Calculator and balancing your checkbook. Eventually, the program you launched a while back gets itself off the ground and creates its main window. And the window sits in the background (since the window manag...

Code
Oct 15, 2013
0
0

Just because I don't deny something doesn't make it true

Raymond Chen
Raymond Chen

There are a number of tricks people try to pull, and I hate them. Today's trick is one of the many varieties of the BCC trick (sometimes less surreptitiously—but still annoyingly—done as a CC trick). Occasionally, I will be quietly added to an email discussion, typically via BCC, without any indication as to why I was added. After rea...

Other
Oct 14, 2013
0
0

The imaginary experience of dining at an underground restaurant

Raymond Chen
Raymond Chen

I dreamed that my brother complained, "Dude, you didn't leave room for my car in the garage." Well yeah, because I didn't know you were coming. We decide to go out for dinner, and I see that he squeezed a third car into our two-car garage. We back out, and I watch the car fit through a gap of two feet between my car and the garage door. We drive a...

Non-ComputerDream
Oct 11, 2013
0
0

C++ corner case: You can implement pure virtual functions in the base class

Raymond Chen
Raymond Chen

In our discussion , we saw that you can declare a pure virtual function with the syntax, and if you try to call one of these functions from the base class, you will get the dreaded R6025 - pure virtual function call error. In that article, I wrote that a pure virtual function is "a method which is declared by the base class, but for which no i...

Code
Oct 10, 2013
0
0

Happy 110th birthday, Professor Alyea

Raymond Chen
Raymond Chen

Professor Hubert Alyea would be 110 years old today, if he were still among us. (He passed away in 1996 at the ripe age of 93.) LIFE magazine called him the science teacher you wish you had for his engaging (and often explosive) chemistry demonstrations. He was called an "international grand master of lecture demonstrations" by Bassam Shakhashir...

Non-Computer