Showing results for 2005 - Page 35 of 40 - The Old New Thing

Mar 4, 2005
Post comments count0
Post likes count0

Modality, part 8: A timed MessageBox, the better version

Raymond Chen
Raymond Chen

A few days ago, we saw a simple version of a timed message box which had a limitation that it could be used from only one thread at a time. Today we'll work to remove that limitation. As you may recall, the reason why it could be used from only one thread at a time was that we kept the "Did the message box time out?" flag in a global. To fix i...

CodeModality
Mar 3, 2005
Post comments count0
Post likes count0

Raymond's random walk, from Swedish designers to Mr. Monkey

Raymond Chen
Raymond Chen

My random walk began at Svenska Dagbladet and the article Svensk designer upprör skottar, about Swedish designer Johanna Larson whose T-shirt depicting the traffic-cone-wearing Duke of Wellington has sparked a debate in the city. The article mentions that the tradition of placing a traffic cone on the head of the Duke is twenty years old, an...

Non-Computer
Mar 3, 2005
Post comments count0
Post likes count0

The bonus window bytes at GWLP_USERDATA

Raymond Chen
Raymond Chen

The window manager provides a pointer-sized chunk of storage you can access via the constant. You pass it to the function and the function to read and write that value. Most of the time, all you need to attach to a window is a single pointer value anyway, so the free memory in is all you need. Note that this value, like the other window ext...

Code
Mar 2, 2005
Post comments count0
Post likes count0

Curling proves itself much more exciting than hockey this year

Raymond Chen
Raymond Chen

NPR reports on an amazing last-rock shot at the Canadian women's curling championship (includes link to CBC video). It's odd hearing Melissa Block discussing curling in decidedly non-curling terms (for the benefit of the decidedly non-curling US listenership). One of the advantages of living in the Seattle area is that you can get all the curlin...

Non-Computer
Mar 2, 2005
Post comments count0
Post likes count0

The scratch window

Raymond Chen
Raymond Chen

Sometimes you need a quick and dirty window and you don't want to go through all the hassle of registering a class for it. For example, you might need a window to do a brief snippet of DDE, or you just need a window to own a message box. To save yourself the trouble of registering a class for every single weenie thing you might need a window for...

Code
Mar 1, 2005
Post comments count0
Post likes count0

Suggestion Box 2

Raymond Chen
Raymond Chen

Post suggestions for future topics here instead of posting off-topic comments. Note that the suggestion box is emptied and read periodically so don't be surprised if your suggestion vanishes. (Note also that I am under no obligation to accept any suggestion.)Topics I are more inclined to cover: Topics I am not inclined to cover: (Due to the way the...

Pages
Mar 1, 2005
Post comments count0
Post likes count0

Modality, part 7: A timed MessageBox, the cheap version

Raymond Chen
Raymond Chen

As we noted at the end of part 3, now that you know the conventions surrounding the message you can put them to your advantage. The more robust you want the function to be, the more work you need to do. Here's the cheap version, based on the sample in the Knowledge Base, but with some additional bug fixes. This function acts just ...

CodeModality
Feb 28, 2005
Post comments count0
Post likes count0

Modality, part 6: Interacting with a program that has gone modal

Raymond Chen
Raymond Chen

Earlier we saw the importance of setting the right owner window for modal UI. It is also important, when manipulating a window, to respect its modality. For example, consider the program we ended up with last time, the one which calls the function to display a modal dialog. If we wanted to get that program to exit and sent a message to the mai...

CodeModality
Feb 28, 2005
Post comments count0
Post likes count0

"Support our troops" wristbands provide only 1/3 support

Raymond Chen
Raymond Chen

Over at Slate, Timothy Noah notes how much money from so-called "awareness bracelets" actually go to the causes they purport to champion. In summary, I find it ironic that the "Support our troops" bracelet doesn't actually support our troops. And is yellow really the right color to use to demonstrate support for the military?

Non-Computer
Feb 25, 2005
Post comments count0
Post likes count1

Two brief reminiscences on the Windows XP "Comments?" button

Raymond Chen
Raymond Chen

In beta versions of Windows XP, there was special code in the window manager to give every window a link in the upper right corner called "Comments?" which if clicked on displayed a dialog that allowed you to submit feedback to Microsoft about that window. Since this was a beta release, there was no anonymity when you submitted feedback. (You...

History